diff --git a/app/controller/api/store/order/StoreCart.php b/app/controller/api/store/order/StoreCart.php index ad9775d9..167becdc 100644 --- a/app/controller/api/store/order/StoreCart.php +++ b/app/controller/api/store/order/StoreCart.php @@ -123,12 +123,14 @@ class StoreCart extends BaseController //更新购物车 $cart_id = $cart['cart_id']; $cart_num = ['cart_num' => ($cart['cart_num'] + $data['cart_num'])]; - if( $cart_num['source'] !=105){ + if($cart_num['source'] !=105){ if ($entryMerId && $entryMerId != $result['product']['mer_id']) { $cart_num['source_id'] = $entryMerId; $cart_num['source'] = StoreCartDao::SOURCE_STORE_CLOUD; } $storeCart = $this->repository->update($cart_id,$cart_num); + }else{ + return app('json')->success(['cart_id' => $cart['cart_id']]); } } else { //添加购物车