diff --git a/pages/confirmCompletion/confirmCompletion.vue b/pages/confirmCompletion/confirmCompletion.vue index 10d57a9..20260da 100644 --- a/pages/confirmCompletion/confirmCompletion.vue +++ b/pages/confirmCompletion/confirmCompletion.vue @@ -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) {} + }); + } + }) + } + }); } }