From a398f33a7f7232f1e659f55ea26f720c7a9361fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=98=89?= <445241500@qq.com> Date: Fri, 24 May 2024 23:19:34 +0800 Subject: [PATCH] 1 --- app/api/controller/Category.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Category.php b/app/api/controller/Category.php index 40f1ca1e..5050cc29 100644 --- a/app/api/controller/Category.php +++ b/app/api/controller/Category.php @@ -51,6 +51,7 @@ class Category extends Controller $model = new CategoryModel; $hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId); $arr = []; + $arr1 = []; if (isset($hasGoods['data']) && !empty($hasGoods['data'])) { foreach ($hasGoods['data'] as $v) { $arr[] = $v['category_id']; @@ -58,10 +59,10 @@ class Category extends Controller } if (!empty($arr)) { - $arr = ['cataIds' => $hasGoods]; + $arr1 = ['cataIds' => $arr]; } - $list = $model->getListPublic($this->request->param(), $arr); + $list = $model->getListPublic($this->request->param(), $arr1); $tmplist = []; foreach ($list as $kl => $l) { $tmplist[$kl] = $this->listcata($list, $hasGoods);