From c487fe3cc0d318e3eef7232ab5c5622a53118fc9 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 11 Jun 2024 18:04:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8API=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E7=B1=BBID=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/lists/product/ProductLists.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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];