shish 4 år sedan
förälder
incheckning
05563a6fcc
1 ändrade filer med 4 tillägg och 8 borttagningar
  1. 4 8
      app-hd/controllers/CategoryController.php

+ 4 - 8
app-hd/controllers/CategoryController.php

@@ -79,22 +79,18 @@ class CategoryController extends BaseController
         util::complete('删除成功');
     }
 
-    //取分类下商品 ssh 2019.12.2
+    //取分类下商品 ssh 20220406
     public function actionGoodsList()
     {
         $categoryId = Yii::$app->request->get('categoryId', 0);
-        //没有分类默认取商家第一个分类
         if (empty($categoryId)) {
-            $categoryId = CategoryService::getTopCategoryId($this->mainId);
-        }
-        if (empty($categoryId)) {
-            util::fail('没有找商品分类');
+            util::fail('没有分类');
         }
         $where = [];
-        $where['sjId'] = $this->sjId;
+        $where['mainId'] = $this->mainId;
         $where['cId'] = $categoryId;
+        $where['flower'] = 0;
         $where['delStatus'] = 0;
-
         $status = Yii::$app->request->get('status', '');
         if (is_numeric($status)) {
             $where['status'] = $status;