作者 SHW\戥岁。。

购物车数量错误

... ... @@ -15,7 +15,7 @@ use think\Db;
*/
class Cart extends Api
{
// protected $noNeedLogin = ['*'];
protected $noNeedLogin = [''];
protected $noNeedRight = ['*'];
/**
... ... @@ -56,7 +56,6 @@ class Cart extends Api
$spec_sku = new Litestoregoodsspec();
$spec_info = $spec_sku->where('goods_spec_id', $sku_id)->find();
if ($cart) {
if ( $number+ $cart['number'] < $spec_info['stock_num']) {
$this->error('库存不足');
}
... ...