Przeglądaj źródła

商品列表传入商户id

family 1 rok temu
rodzic
commit
80811fa4e4
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      app/controller/api/store/merchant/Merchant.php

+ 3 - 2
app/controller/api/store/merchant/Merchant.php

@@ -92,7 +92,7 @@ class Merchant extends BaseController
92 92
 
93 93
     public function productTypeList()
94 94
     {
95
-        $params= $this->request->params(['type','mer_cate_id','pageNum','pageSize']);
95
+        $params= $this->request->params(['type','mer_cate_id','pageNum','pageSize','mer_id']);
96 96
         $name=$params['type'];
97 97
 
98 98
         $domain = $this->request->domain();
@@ -117,7 +117,8 @@ class Merchant extends BaseController
117 117
             $id=491;
118 118
         }// 商贸区
119 119
         else if($name=='commercetrade'){
120
-            $id=$this->merId;
120
+            if (empty($params['mer_id'])) return app('json')->fail('店铺不存在');
121
+            $id=$this->merId = $params['mer_id'];
121 122
             $is_commercetrade = 1;
122 123
         }
123 124
         [$page, $limit] = $this->getPage();