提交 41057398 编写于 作者: 杜庆泉's avatar 杜庆泉

location page format

上级 ebaefb23
......@@ -39,10 +39,10 @@
data() {
return {
title: 'get-location',
altitudeSelect:false,
isHighAccuracySelect:false,
geocodeSelect:false,
exeRet:'',
altitudeSelect: false,
isHighAccuracySelect: false,
geocodeSelect: false,
exeRet: '',
items: [{
value: 'gcj02',
name: 'gcj02'
......@@ -75,25 +75,24 @@
},
getLocationTap: function () {
uni.showLoading({
title:'定位中'
title: '定位中'
})
console.log(this.altitudeSelect)
uni.getLocation(({
type: this.items[this.current].value,
altitude:this.altitudeSelect,
isHighAccuracy:this.isHighAccuracySelect,
geocode:this.geocodeSelect,
success: function (res:any) {
altitude: this.altitudeSelect,
isHighAccuracy: this.isHighAccuracySelect,
geocode: this.geocodeSelect,
success: function (res : any) {
uni.hideLoading()
console.log(res);
this.exeRet = JSON.stringify(res)
},
fail: function (res:any) {
fail: function (res : any) {
uni.hideLoading()
console.log(res);
this.exeRet = JSON.stringify(res)
} ,
complete: function (res:any) {
},
complete: function (res : any) {
uni.hideLoading()
console.log(res);
this.exeRet = JSON.stringify(res)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册