|
@ -124,8 +124,9 @@ const Index = () => { |
|
|
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}`, |
|
|
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}`, |
|
|
success: function (res) { |
|
|
success: function (res) { |
|
|
// 根据自己项目需求获取res内容 |
|
|
// 根据自己项目需求获取res内容 |
|
|
let addresscity = res.data.result.address_component.province + res.data.result.address_component.city + res.data.result.address_component.district |
|
|
// let addresscity = res.data.result.address_component.province + res.data.result.address_component.city + res.data.result.address_component.district |
|
|
setAddress(addresscity + res.data.result.address_component.street_number) |
|
|
// console.log(res, 'res') |
|
|
|
|
|
setAddress(res.data.result.formatted_addresses.standard_address) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|