Bläddra i källkod

Merge branch 'master' into huangfamily

family 1 år sedan
förälder
incheckning
a17884ac24
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      app/controller/api/store/merchant/Merchant.php

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

@@ -150,7 +150,7 @@ class Merchant extends BaseController
150
      */
150
      */
151
     public function commerceProductList()
151
     public function commerceProductList()
152
     {
152
     {
153
-        $params= $this->request->params(['pageNum','pageSize']);
153
+        $params= $this->request->params(['pageNum','pageSize','category_id']);
154
         $mer_id_unset = [496,486,439,148,491];
154
         $mer_id_unset = [496,486,439,148,491];
155
         $domain = $this->request->domain();
155
         $domain = $this->request->domain();
156
         if(strpos($domain, 'test.hebeiyhc.com') !== false) {
156
         if(strpos($domain, 'test.hebeiyhc.com') !== false) {
@@ -168,7 +168,8 @@ class Merchant extends BaseController
168
         if($params['pageSize']!=''){
168
         if($params['pageSize']!=''){
169
             $limit=$params['pageSize'];
169
             $limit=$params['pageSize'];
170
         }
170
         }
171
-        $mer_list = Db::name('merchant')->where(['category_id' => 32,'status' => 1,'is_del' => 0])->page($page)->limit($limit)->select();
171
+        $category_id = $params['category_id']?:32;
172
+        $mer_list = Db::name('merchant')->where(['category_id' => $category_id,'status' => 1,'is_del' => 0])->page($page)->limit($limit)->select();
172
         $where['is_gift_bag'] = 0;
173
         $where['is_gift_bag'] = 0;
173
         $where['is_used'] = 1;
174
         $where['is_used'] = 1;
174
         $where['product_type'] = 0;
175
         $where['product_type'] = 0;