...
|
...
|
@@ -16,6 +16,7 @@ use app\index\model\Goodstype; |
|
|
use app\index\model\Pic;
|
|
|
use app\index\model\Province;
|
|
|
use app\index\model\Store;
|
|
|
use think\Db;
|
|
|
|
|
|
class Goods extends Frontend
|
|
|
{
|
...
|
...
|
@@ -192,7 +193,7 @@ class Goods extends Frontend |
|
|
$where['g.is_clearance'] = ['eq',$param['is_clearance']];
|
|
|
}
|
|
|
if(!empty($param['keyword'])){
|
|
|
$where['t.name|s.name|g.goodsname|g.brand'] = ['like',"%$param[keyword]%"];
|
|
|
$where['t.name|s.name|g.goodsname|g.brand|g.keyword'] = ['like',"%$param[keyword]%"];
|
|
|
}
|
|
|
if(!empty($param['category_id'])){
|
|
|
$where['g.goodstype_id'] = ['eq',$param['category_id']];
|
...
|
...
|
@@ -275,7 +276,12 @@ class Goods extends Frontend |
|
|
}
|
|
|
$storeModel = new Store();
|
|
|
$evaluateModel = new Evaluate();
|
|
|
//店铺id
|
|
|
$store_ids = [];
|
|
|
foreach($data as $key => $vo){
|
|
|
if(!in_array($vo['store_id'],$store_ids)){
|
|
|
$store_ids[] = $vo['store_id'];
|
|
|
}
|
|
|
//判断店铺在该区域是否为会员
|
|
|
$insurance = '2';
|
|
|
$store = $storeModel->findData(['id'=>$vo['store_id']]);
|
...
|
...
|
@@ -309,7 +315,8 @@ class Goods extends Frontend |
|
|
array_multisort($sort,SORT_DESC,$data->items());
|
|
|
}
|
|
|
}
|
|
|
$this->success('SUCCESS','',$data);
|
|
|
$store = Db::name('store')->where(['id'=>['in',$store_ids]])->select();
|
|
|
$this->success('SUCCESS','',$data,$store);
|
|
|
}
|
|
|
public function get_one(){
|
|
|
$param = $this->request->param();
|
...
|
...
|
|