|
|
@ -176,13 +176,18 @@ const Index = () => { |
|
|
|
console.log('地址:::', res); |
|
|
|
// 根据自己项目需求获取res内容 |
|
|
|
let addresscity = '' |
|
|
|
addresscity = |
|
|
|
res.data.result.address_component.province |
|
|
|
+ res.data.result.address_component.city |
|
|
|
+ res.data.result.address_component.district |
|
|
|
+ res.data.result.address_component.street_number |
|
|
|
// addresscity = |
|
|
|
// res.data.result.address_component.province |
|
|
|
// + res.data.result.address_component.city |
|
|
|
// + res.data.result.address_component.district |
|
|
|
// + res.data.result.address_component.street_number |
|
|
|
|
|
|
|
// + res.data.result.address_component.street |
|
|
|
|
|
|
|
// addresscity = res.data.result.formatted_addresses.standard_address |
|
|
|
|
|
|
|
addresscity = res.data.result.address |
|
|
|
|
|
|
|
let street = res.data.result.address_component.street |
|
|
|
setRoad(street) |
|
|
|
setAddress(addresscity) |
|
|
|