作者 SHW\戥岁。。

购物车数量错误

... ... @@ -57,7 +57,7 @@ class Cart extends Api
$spec_info = $spec_sku->where('goods_spec_id', $sku_id)->find();
if ($cart) {
if ($spec_info['stock_num'] + $cart['number'] < $number) {
if ( $number+ $cart['number'] < $spec_info['stock_num']) {
$this->error('库存不足');
}
$cart->setInc('number', $number);
... ...