From bc548f2afa7289e9de3e657dcbe494945b0ad6e4 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 12 Dec 2023 11:16:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=95=87=E7=BA=A7=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E9=93=BE=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/product/CloudWarehouse.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controller/api/store/product/CloudWarehouse.php b/app/controller/api/store/product/CloudWarehouse.php index be5d6d02..75f6a67d 100644 --- a/app/controller/api/store/product/CloudWarehouse.php +++ b/app/controller/api/store/product/CloudWarehouse.php @@ -75,7 +75,7 @@ class CloudWarehouse extends BaseController */ public function town() { - $params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword', 'page']); + $params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword', 'page','cate_pid']); $search = [ 'street_id' => $params['street_code'], 'type_id' =>[Merchant::TypeStore,Merchant::TypeTownSupplyChain], @@ -101,6 +101,9 @@ class CloudWarehouse extends BaseController if (!empty($params['category_id'])) { $where['cate_id'] = $params['category_id']; } + if($params['cate_pid']!=''){ + $where['cate_pid'] = $params['cate_pid']; + } $products = $this->spuRepository->getApiSearch($where, $page, $limit, false,true); return app('json')->success($products); }