地区接口
This commit is contained in:
parent
d1a3dc08f7
commit
927ab3bc8b
|
@ -13,6 +13,7 @@
|
|||
|
||||
class GeoController extends BaseLikeAdminController
|
||||
{
|
||||
public array $notNeedLogin=['province','city', 'county','towns','villages','groups'];
|
||||
// 获取省份
|
||||
public function province(): Json
|
||||
{
|
||||
|
@ -49,7 +50,7 @@
|
|||
if(empty($county_code)){
|
||||
return $this->fail('请选择区县');
|
||||
}
|
||||
$data = Town::field('town_code,town_name')->where('county_code',$county_code)->select();
|
||||
$data = Town::field('town_code,town_name,lng,lat')->where('county_code',$county_code)->select();
|
||||
return $this->success('请求成功',$data->toArray());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue