...
|
...
|
@@ -551,21 +551,21 @@ class Store extends Api |
|
|
{
|
|
|
$page = $this->request->param('page', 1, 'intval');
|
|
|
$pageNum = $this->request->param('pageNum', 10, 'intval');
|
|
|
$city_name = $this->request->param('city_name');
|
|
|
if(empty($city_name)){
|
|
|
$this->error('城市名称不能为空');
|
|
|
}
|
|
|
$city_id = Db::name('area')->where('name',$city_name)->value('id');
|
|
|
// $city_name = $this->request->param('city_name');
|
|
|
// if(empty($city_name)){
|
|
|
// $this->error('城市名称不能为空');
|
|
|
// }
|
|
|
// $city_id = Db::name('area')->where('name',$city_name)->value('id');
|
|
|
$type_id = $this->request->param('type_id');
|
|
|
if(empty($type_id)){
|
|
|
$data['total_num'] = Db::name('application')
|
|
|
->field('id,image,name,createtime')
|
|
|
->where('city_id',$city_id)
|
|
|
// ->where('city_id',$city_id)
|
|
|
->where('status',1)
|
|
|
->count();
|
|
|
$data['info'] = Db::name('application')
|
|
|
->field('id,image,name,createtime')
|
|
|
->where('city_id',$city_id)
|
|
|
// ->where('city_id',$city_id)
|
|
|
->where('status',1)
|
|
|
->order('createtime desc')
|
|
|
->page($page,$pageNum)
|
...
|
...
|
@@ -578,13 +578,13 @@ class Store extends Api |
|
|
}else{
|
|
|
$data['total_num'] = Db::name('application')
|
|
|
->field('id,image,name,createtime')
|
|
|
->where('city_id',$city_id)
|
|
|
// ->where('city_id',$city_id)
|
|
|
->where('type_id',$type_id)
|
|
|
->where('status',1)
|
|
|
->count();
|
|
|
$data['info'] = Db::name('application')
|
|
|
->field('id,image,name,createtime')
|
|
|
->where('city_id',$city_id)
|
|
|
// ->where('city_id',$city_id)
|
|
|
->where('status',1)
|
|
|
->where('type_id',$type_id)
|
|
|
->order('createtime desc')
|
...
|
...
|
|