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

This commit is contained in:
wangxiaowei 2024-12-16 16:11:14 +08:00
parent f8d0e6d576
commit e66e3727f5

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