...
|
...
|
@@ -338,11 +338,16 @@ class Goods extends Api |
|
|
if (!empty($params['category2_id'])) $where['category2_id'] = $params['category2_id'];
|
|
|
|
|
|
// $where['g.ch_name|g.en_name|g.ch_content|g.en_content|cate1.name|cate2.name|cate3.name'] = ['like','%'.$params['keyword'].'%'];
|
|
|
$cateWhere['name'] = $params['keyword'];
|
|
|
$cateWhere['en_name'] = $params['keyword'];
|
|
|
$cateIds = $this->categoryModel->whereOr($cateWhere)->column('id');
|
|
|
$cateIds = implode(',',$cateIds);
|
|
|
$whereOr['g.category_one_id|g.category_two_id|g.category_three_id'] = ['like','%,'.$cateIds.',%'];
|
|
|
$where['g.ch_name|g.en_name'] = ['like','%'.$params['keyword'].'%'];
|
|
|
//获取筛选标签,国家,品牌,等级,部位,品类
|
|
|
$data['extend'] = $this->categoryModel->getExtend($where,$this->lang);
|
|
|
$data['extend'] = $this->categoryModel->getExtend($where,$this->lang,$whereOr);
|
|
|
//获取列表数据
|
|
|
$data['list'] = $this->goodsModel->selectPageData($where,$page,$limit,$this->lang);
|
|
|
$data['list'] = $this->goodsModel->selectPageData($where,$page,$limit,$this->lang,$whereOr);
|
|
|
foreach ($data['list']['list'] as $k => $v){
|
|
|
$v['user_type'] = $this->user['type'];
|
|
|
$data['list']['list'][$k]['price'] = get_price_not_group($v);
|
...
|
...
|
|