作者 何书鹏
1 个管道 的构建 通过 耗费 0 秒

合并分支 'heshupeng' 到 'master'

Heshupeng



查看合并请求 !33
... ... @@ -304,6 +304,10 @@ class House extends Api
"data": {
"id"://市级id
"name"://市级名称
"children": [{
"id": //区级id
"name": //区级id
}]
}
]
}
... ... @@ -311,11 +315,16 @@ class House extends Api
*/
public function city_list()
{
// $page = $this->request->param('page', 1, 'intval');
// $pageNum = $this->request->param('pageNum', 10, 'intval');
$data['total_num'] = Db::name('area')->field('id,name')->where('level',2)->count();
$data['info'] = Db::name('area')->field('id,name')->where('level',2)->select();
$this->success('success',$data);
$total_num = Db::name('area')->field('id,name')->where('level',2)->count();
$city_list = Db::name('area')->field('id,name')->where('level',2)->select();
foreach ($city_list as &$v) {
$v['children'] = Db::name('area')
->where('level',3)
->where('pid',$v['id'])
->field('id,name')
->select();
}
$this->success('success',compact('total_num','city_list'));
}
... ...
... ... @@ -4785,6 +4785,10 @@
"data": {
"id"://市级id
"name"://市级名称
"children": [{
"id": //区级id
"name": //区级id
}]
}
]
}
... ... @@ -11547,7 +11551,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-08-27 19:23:30 </div>
Generated on 2020-08-27 20:03:59 </div>
<div class="col-md-6" align="right">
<a href="./" target="_blank">社区</a>
</div>
... ...