WIN-2308041133\Administrator hace 2 meses
padre
commit
31a9454b32

+ 1 - 0
app/adminapi/controller/v1/product/StoreProduct.php

@@ -267,6 +267,7 @@ class StoreProduct extends AuthController
             ['label_list', []],//商品标签
             ['protection_list', []],//商品保障
             ['is_gift', 0],//是否礼品
+            ['is_lb', 0],//是否礼品
             ['gift_price', 0],//礼品附加费
         ]);
         $this->service->save((int)$id, $data);

+ 2 - 2
app/api/controller/v1/store/StoreCartController.php

@@ -91,8 +91,8 @@ class StoreCartController
         if ($type == 0) $cartService->checkVipGoodsBuy($request->user(), $where['productId']);
         //        检测是否是礼包商品
         $storeServices = app()->make(StoreProductServices::class);
-        $is_gift = $storeServices->value(['id'=>$where['productId']],'is_gift');
-        if ($is_gift == 1){
+        $is_lb = $storeServices->value(['id'=>$where['productId']],'is_lb');
+        if ($is_lb == 1){
             return app('json')->fail('礼包商品不支持加入购物车');
         }
         $res = $cartService->setCart($request->uid(), $where['productId'], $where['cartNum'], $where['uniqueId'], $type, $new, $where['combinationId'], $where['secKillId'], $where['bargainId'], $where['advanceId']);