Explorar el Código

商品分类-取消硬编码-修复错误

xupuyuan hace 3 meses
padre
commit
34cb776af0

+ 2 - 2
app/common/repositories/store/StoreCategoryRepository.php

@@ -92,10 +92,10 @@ class StoreCategoryRepository extends BaseRepository
92 92
      * @Date: 2020/5/16
93 93
      * @return mixed
94 94
      */
95
-    public function getList()
95
+    public function getList($merId)
96 96
     {
97 97
         //$menus = $this->dao->getAllOptions(0);取消硬编码
98
-        $menus = $this->dao->getAllOptions( $this->request->merId());
98
+        $menus = $this->dao->getAllOptions($merId);
99 99
         $menus = formatCascaderData($menus, 'cate_name', 3);
100 100
         return $menus;
101 101
     }

+ 2 - 1
app/controller/admin/store/StoreCategory.php

@@ -187,7 +187,8 @@ class StoreCategory extends BaseController
187 187
      */
188 188
     public function getList()
189 189
     {
190
-        return app('json')->success($this->repository->getList());
190
+        $merId = $this->request->merId();
191
+        return app('json')->success($this->repository->getList($merId));
191 192
     }
192 193
 
193 194
     /**