diff --git a/app/common/model/Goods.php b/app/common/model/Goods.php index c58317cf..640e8931 100644 --- a/app/common/model/Goods.php +++ b/app/common/model/Goods.php @@ -344,8 +344,8 @@ class Goods extends BaseModel } // 商品名称 - if(count($params['keywords']) > 0 ) { - $filter[] = ['goods_name', 'like', "%{$params['keywords']}%"]; + foreach ($params['keywords'] as $val){ + $filter[] = ['goods_name', 'like', "%{$val}%"]; } // 商品名称 !empty($params['goodsName']) && $filter[] = ['goods_name', 'like', "%{$params['goodsName']}%"];