From 1b2e37735fd1be5364ae99ff35a8fce00ce773a4 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Mon, 16 Dec 2024 16:27:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=90=9C=E7=B4=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/GoodsLogic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/logic/GoodsLogic.php b/app/api/logic/GoodsLogic.php index 891b9884..b3e662c0 100755 --- a/app/api/logic/GoodsLogic.php +++ b/app/api/logic/GoodsLogic.php @@ -518,7 +518,7 @@ class GoodsLogic extends Logic // dump($wh); // dump($where); // dump($order);die; - $whereIn = ''; + $cate = []; if (isset($get['keyword'])) { $cate = GoodsCategory::where(['is_show' => 1, 'del' => 0]) ->where([['name', 'like', '%' . trim($get['keyword']) . '%']]) @@ -527,7 +527,7 @@ class GoodsLogic extends Logic ->toArray(); } - if ($cate) { + if (!empty($cate)) { $where = array_filter($where, function($item) { return $item[0] !== "name"; });