Commit 4a754286 authored by clone's avatar clone

查询条件

parent a6a17bcf
......@@ -153,4 +153,30 @@ class Shop extends Basic
}
return $this->response("200", 'request success', $result);
}
public function filtrateCondition()
{
$field = "city,disc";
$param['id'] = array( '<>', 16 );
$param['room_num_left'] = array( '<>', 0 );
$group_ = "disc";
$cityList = $this->db->getCityList($field, $param, $group_);
print_r($cityList);exit;
/* $return['data']['yetai'] = array( '全部', '餐饮美食', '零售', '休闲娱乐', '其他' );//业态
$return['data']['money'] = array( array( 'id' => '', 'value' => '全部' ), array( 'id' => '0', 'value' => '3万以上' ), array( 'id' => '1', 'value' => '1万-3万' ), array( 'id' => '2', 'value' => '1万以下' ) );//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$return['data']['more'] = array( '全部' );//更多
$return['data']['acreage'] = array( array( 'id' => '', 'value' => '全部' ), array( 'id' => '0', 'value' => '30m²以内' ), array( 'id' => '1', 'value' => '30-60m²' ), array( 'id' => '2', 'value' => '60-100m²' ), array( 'id' => '3', 'value' => '100m²以上' ) );//面积
$Label = $this->Label->find("all");
if ($Label) {
foreach ($Label AS $k3 => $v3) {
if ($v3['Label']['name']) {
$return['data']['more'][] = $v3['Label']['name'];
}
}
}*/
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ namespace app\api\controller;
* User : zw
* Date : 2017/12/12
* Time : 10:39
* Intro:
* Intro: 委托转铺
*/
use app\api\extend\Basic;
use app\model\SubletModel;
......
......@@ -73,4 +73,14 @@ class HouseInfos extends Model
}
function getCityList( $field, $params, $group)
{
return $data = $this->dbHouseInfo
->field($field)
->where($params)
->group()
->select();
}
}
......@@ -61,8 +61,9 @@ Route::group('api',[
'login' => ['api/member/login',['method' => 'post']], //c端登陆
'register' => ['api/member/register',['method'=> 'post']], //注册|邀请注册|编辑
//post shop
// shop
'shopList' => ['api/shop/getShopList', ['method' => 'post']],
'filtrateCondition' => ['api/shop/filtrateCondition', ['method' => 'post']],
'shopDetail' => ['api/shop/getShopDetail', ['method' => 'get']],
//get banner
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment