WIN-2308041133\Administrator před 1 měsícem
rodič
revize
1ec8d8157e

+ 8 - 5
app/api/controller/v1/store/StoreProductController.php

@@ -97,12 +97,15 @@ class StoreProductController
         } else {
             $where['store_label_id'] = [];
         }
-        // is_lb 条件处理
-        if (isset($where['is_lb']) && $where['is_lb'] == 1) {
-            $where['is_lb'] = 1;
-        } else {
-            unset($where['is_lb']);
+        if (!empty($where['is_lb'])){
+            // is_lb 条件处理
+            if (isset($where['is_lb']) && $where['is_lb'] == 1) {
+                $where['is_lb'] = 1;
+            } else {
+                unset($where['is_lb']);
+            }
         }
+
         $type = 'big';
         $field = ['image', 'recommend_image'];
         $list = $this->services->getGoodsList($where, (int)$request->uid());