소스 검색

购物车增加的时候验证限购

evoxwht 2 년 전
부모
커밋
1dd4da9a78
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      crmeb/app/services/order/StoreCartServices.php

+ 4 - 2
crmeb/app/services/order/StoreCartServices.php

@@ -432,8 +432,10 @@ class StoreCartServices extends BaseServices
      */
      */
     public function setCartNum($uid, $productId, $num, $unique, $type)
     public function setCartNum($uid, $productId, $num, $unique, $type)
     {
     {
-        //检查限购
-        $this->checkLimit($uid, $productId, $num, 0);
+        if ($type == 1) {
+            //检查限购
+            $this->checkLimit($uid, $productId, $num, 0);
+        }
 
 
         /** @var StoreProductAttrValueServices $attrValueServices */
         /** @var StoreProductAttrValueServices $attrValueServices */
         $attrValueServices = app()->make(StoreProductAttrValueServices::class);
         $attrValueServices = app()->make(StoreProductAttrValueServices::class);