作者 刘朕
1 个管道 的构建 通过 耗费 0 秒

合并分支 'liuzhen' 到 'master'

Liuzhen



查看合并请求 !55
... ... @@ -511,6 +511,8 @@ class Store extends Api
* @ApiRoute (/api/store/house_list)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="area", type="string", required=false, description="市区地址例如:'天津市/西青区'")
* @ApiParams (name="keyword", type="string", required=false, description="关键字")
*
*
* @ApiReturn({
... ... @@ -534,6 +536,14 @@ class Store extends Api
$where = [
'id' => ['in',$store['house_ids']]
];
$area = $this->request->param('area');
$keyword = $this->request->param('keyword');
if(!empty($area)){
$where['area'] = ['like',"%$area%"];
}
if(!empty($keyword)){
$where['name'] = ['like',"%$keyword%"];
}
$data = Db::name('house')
->where($where)
->field('id,name,area')
... ...