修改
This commit is contained in:
parent
c4823f035c
commit
2701a974de
@ -266,35 +266,35 @@
|
||||
this.orderNo = this.itemlist.orderNo
|
||||
},
|
||||
onShow() {
|
||||
// var that = this
|
||||
// uni.getLocation({
|
||||
// type: 'wgs84',
|
||||
// success: function(res) {
|
||||
// that.list.serveLocationLatitude = res.latitude
|
||||
// that.list.serveLocationLongitude = res.longitude
|
||||
// uni.request({
|
||||
// url: "https://apis.map.qq.com/ws/geocoder/v1/" + '?location=' + res.latitude +
|
||||
// ',' +
|
||||
// res.longitude + "&key=TXGBZ-VGEWW-LJHRR-3CDLI-N57YO-YQBHJ",
|
||||
// method: 'GET',
|
||||
// success: function(respone) {
|
||||
// that.list.serviceLocationName = respone.data.result.address
|
||||
// },
|
||||
// fail(err) {}
|
||||
// })
|
||||
// },
|
||||
// fail: error => {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '获取定位失败,是否授权打开定位',
|
||||
// success: (res) => {
|
||||
// uni.openSetting({
|
||||
// success(res) {}
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
var that = this
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
that.list.serveLocationLatitude = res.latitude
|
||||
that.list.serveLocationLongitude = res.longitude
|
||||
uni.request({
|
||||
url: "https://apis.map.qq.com/ws/geocoder/v1/" + '?location=' + res.latitude +
|
||||
',' +
|
||||
res.longitude + "&key=TXGBZ-VGEWW-LJHRR-3CDLI-N57YO-YQBHJ",
|
||||
method: 'GET',
|
||||
success: function(respone) {
|
||||
that.list.serviceLocationName = respone.data.result.address
|
||||
},
|
||||
fail(err) {}
|
||||
})
|
||||
},
|
||||
fail: error => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '获取定位失败,是否授权打开定位',
|
||||
success: (res) => {
|
||||
uni.openSetting({
|
||||
success(res) {}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user