WIN-2308041133\Administrator 2 месяцев назад
Родитель
Сommit
5e9c6a5db4
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      app/api/controller/v1/store/StoreProductController.php

+ 7 - 0
app/api/controller/v1/store/StoreProductController.php

@@ -62,6 +62,7 @@ class StoreProductController
             [['coupon_category_id', 'd'], 0],
             ['cate_id', ''],
             ['store_label_id', ''],
+            [['is_lb', 'd'], 0],
         ]);
         if ($where['selectId'] && (!$where['sid'] || !$where['cid'])) {
             if ($services->value(['id' => $where['selectId']], 'pid')) {
@@ -96,6 +97,12 @@ 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']);
+        }
         $type = 'big';
         $field = ['image', 'recommend_image'];
         $list = $this->services->getGoodsList($where, (int)$request->uid());