商品搜索添加商品分类搜索

This commit is contained in:
wangxiaowei 2024-12-16 16:12:15 +08:00
parent e66e3727f5
commit ac0163dec2

@ -429,7 +429,7 @@ class GoodsLogic extends Logic
} }
$whereIn = ''; $whereIn = '';
if (isset($get['cate']) && $get['cate'] && $get['keyword']) { if (isset($get['cate']) && $get['cate'] && isset($get['keyword'])) {
$cate = GoodsCategory::where(['is_show' => 1, 'del' => 0]) $cate = GoodsCategory::where(['is_show' => 1, 'del' => 0])
->where([['name', 'like', '%' . trim($get['keyword']) . '%']]) ->where([['name', 'like', '%' . trim($get['keyword']) . '%']])
->field('id') ->field('id')