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

location page format

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