商品搜索添加商品分类搜索
This commit is contained in:
parent
76dbf143aa
commit
1b2e37735f
@ -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";
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user