Browse Source

地址定位取值

dev
巴林闲侠 1 year ago
parent
commit
e38149ba09
  1. 15
      weapp/src/packages/patrol/index.jsx

15
weapp/src/packages/patrol/index.jsx

@ -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)

Loading…
Cancel
Save