|
@ -160,8 +160,8 @@ const Index = () => { |
|
|
Taro.getLocation({ |
|
|
Taro.getLocation({ |
|
|
// type: 'wgs84', |
|
|
// type: 'wgs84', |
|
|
type: 'gcj02', |
|
|
type: 'gcj02', |
|
|
isHighAccuracy: true, |
|
|
// isHighAccuracy: true, |
|
|
// isHighAccuracy: false, |
|
|
isHighAccuracy: false, |
|
|
highAccuracyExpireTime: 1000 * 6, |
|
|
highAccuracyExpireTime: 1000 * 6, |
|
|
success: function (res) { |
|
|
success: function (res) { |
|
|
setLongitude(res.longitude) |
|
|
setLongitude(res.longitude) |
|
@ -169,6 +169,7 @@ const Index = () => { |
|
|
Taro.request({ |
|
|
Taro.request({ |
|
|
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) { |
|
|
|
|
|
console.log('地址:::', res); |
|
|
// 根据自己项目需求获取res内容 |
|
|
// 根据自己项目需求获取res内容 |
|
|
let addresscity = '' |
|
|
let addresscity = '' |
|
|
addresscity = |
|
|
addresscity = |
|
|