增加定位接口位置

This commit is contained in:
lcc
2025-10-14 20:53:04 +08:00
parent 0593748c11
commit 4dbe71093f
+5 -4
View File
@@ -75,10 +75,10 @@ class Config extends BaseController
public function city_get()
{
$data = [
'provinceId' => '',
'provinceName' => '',
'cityId' => '',
'cityName' => '全国',
'provinceId' => '350200',
'provinceName' => '福建省',
'cityId' => '350200',
'cityName' => '厦门市',
];
$latitude = $this->input_param('latitude');
$longitude = $this->input_param('longitude');
@@ -87,6 +87,7 @@ class Config extends BaseController
}
$tcGeocoder = new TcGeocoder();
$result = $tcGeocoder->reverseGeocode($latitude, $longitude);
debug_log("解析结果:".json_encode($result),'local.log');
if (!$result) {
$this->return_json('地址解析失败');
}