This commit is contained in:
yanran200730
2022-07-29 09:13:56 +08:00
parent 3ab04fef78
commit 040c11b215
2 changed files with 8 additions and 10 deletions

View File

@@ -23,15 +23,6 @@ export default {
Tabbar
},
methods: {
...mapActions(['injectJWeixin']),
onChange(e) {
this.params = e.params
this.component = e.type
}
},
onLoad () {
uni.setStorageSync('address', {
lat: '',
@@ -49,6 +40,13 @@ export default {
},
methods: {
...mapActions(['injectJWeixin']),
onChange(e) {
this.params = e.params
this.component = e.type
},
getLocation () {
this.injectJWeixin(['getLocation']).then(() => {
wx.getLocation({

View File

@@ -186,7 +186,7 @@
this.img = decodeURIComponent(query.url)
this.height = uni.getSystemInfoSync().windowHeight
if (uni.getStorageSync('address').address) {
if (!uni.getStorageSync('address').address) {
this.getLocation()
}