shish 3 лет назад
Родитель
Сommit
7b5bd393fa
1 измененных файлов с 6 добавлено и 5 удалено
  1. 6 5
      app-mall/controllers/HdController.php

+ 6 - 5
app-mall/controllers/HdController.php

@@ -12,14 +12,15 @@ class HdController extends BaseController
 
     public function actionList()
     {
-        $where = [];
-        $where['ownShopId'] = $this->shopId;
-        $respond = HdClass::getHdList($where);
-
         $showGlInfo = getenv('SHOW_GL_INFO');
         $info = $showGlInfo === false ? 1 : $showGlInfo;
+        if (isset($this->userId) || empty($this->userId)) {
+            util::success(['list' => [], 'showGlInfo' => $info]);
+        }
+        $where = [];
+        $where['userId'] = $this->userId;
+        $respond = HdClass::getHdList($where);
         $respond['showGlInfo'] = $info;
-
         util::success($respond);
     }