diff --git a/app/api/lists/product/ProductLists.php b/app/api/lists/product/ProductLists.php index 22da1023..7ef79db9 100644 --- a/app/api/lists/product/ProductLists.php +++ b/app/api/lists/product/ProductLists.php @@ -76,6 +76,7 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface public function lists(): array { $class_all=$this->request->get('class_all'); + $cate_id=$this->request->get('class'); $name = $this->request->get('name',''); $order_param = $this->request->get('order'); $store_id = $this->request->get('store_id',2); @@ -88,9 +89,9 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface if($arr){ $arr2=Cate::where('pid','in',$arr)->column('id'); $where[]=['cate_id','in',array_merge($arr,$arr2)]; - }else{ - $where[]=['cate_id','=',$class_all]; } + }else{ + $where[]=['cate_id','=',$cate_id]; } if(!empty($order_param)){ @@ -117,7 +118,6 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface }else{ $where[]=['store_id','=',2]; } - $M_store_id=$this->request->__get('store_id'); if($M_store_id){ $where[]=['store_id','=',$M_store_id];