Browse Source

商品列表传入商户id

family 1 year ago
parent
commit
80811fa4e4
1 changed files with 3 additions and 2 deletions
  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
     public function productTypeList()
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
         $name=$params['type'];
96
         $name=$params['type'];
97
 
97
 
98
         $domain = $this->request->domain();
98
         $domain = $this->request->domain();
@@ -117,7 +117,8 @@ class Merchant extends BaseController
117
             $id=491;
117
             $id=491;
118
         }// 商贸区
118
         }// 商贸区
119
         else if($name=='commercetrade'){
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
             $is_commercetrade = 1;
122
             $is_commercetrade = 1;
122
         }
123
         }
123
         [$page, $limit] = $this->getPage();
124
         [$page, $limit] = $this->getPage();