shish 2 yıl önce
ebeveyn
işleme
c2203e0f83
1 değiştirilmiş dosya ile 3 ekleme ve 16 silme
  1. 3 16
      app-hd/controllers/GhsProductController.php

+ 3 - 16
app-hd/controllers/GhsProductController.php

@@ -7,12 +7,9 @@
 namespace hd\controllers;
 
 use biz\shop\services\ShopService;
-use bizGhs\admin\classes\AdminClass;
-use bizGhs\item\classes\ItemClass;
 use bizGhs\item\classes\ItemClassClass;
 use bizGhs\product\classes\ProductClass;
 use bizGhs\product\services\ProductService;
-use bizGhs\item\services\ItemService;
 use common\components\util;
 use Yii;
 
@@ -24,25 +21,15 @@ class GhsProductController extends BaseController
     {
         $get = Yii::$app->request->get();
         $shopId = $get['shopId']??0;
-        $sjId = $get['sjId']??0;
-
-        //获取所有当前供货商的分类 (全部、常用)
-        //根据分类组装分类下的花材信息
-        //中央ID
         $classIds = ItemClassClass::getGhsItemClassAll($this->mainId);
-//        $where['sjId'] = $sjId;
-//        $where['shopId'] = $shopId;
-
         $where['mainId'] = $this->mainId;
         $where['delStatus'] = 0;
-
         $itemInfoData = ProductClass::getAllByCondition($where,['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC],"*");
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
-
-        $data = ProductService::assembleData($classIds, $itemInfoData, true);
+        $respond = ProductService::assembleData($classIds, $itemInfoData, true);
+        $classItem = $respond['classItem'] ?? [];
         ShopService::totalViewPlus($shopId);
-        util::success($data);
-
+        util::success($classItem);
     }
 
 }