测试
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Tabbar from './components/Tabbar.vue'
|
import Tabbar from './components/Tabbar.vue'
|
||||||
import { mapActions } from "vuex"
|
import { mapActions, mapState } from "vuex"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppCountryAlbum',
|
name: 'AppCountryAlbum',
|
||||||
@@ -39,8 +39,12 @@ export default {
|
|||||||
this.$refs?.TabPage?.show()
|
this.$refs?.TabPage?.show()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState['wxwork']
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['injectJWeixin']),
|
...mapActions(['injectJWeixin', 'agentSign']),
|
||||||
|
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
this.params = e.params
|
this.params = e.params
|
||||||
@@ -48,6 +52,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getLocation () {
|
getLocation () {
|
||||||
|
this.agentSign({
|
||||||
|
corpId: this.wxwork.config.corpId,
|
||||||
|
suiteId: this.wxwork.config.suiteId
|
||||||
|
}).then(() => {
|
||||||
this.injectJWeixin(['getLocation']).then(() => {
|
this.injectJWeixin(['getLocation']).then(() => {
|
||||||
wx.getLocation({
|
wx.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
@@ -63,6 +71,11 @@ export default {
|
|||||||
address: data.address,
|
address: data.address,
|
||||||
cityCode: `${data.ad_info.adcode}`
|
cityCode: `${data.ad_info.adcode}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.address = {
|
||||||
|
...uni.getStorageSync('address')
|
||||||
|
}
|
||||||
|
|
||||||
this.getWeather(`${data.ad_info.adcode}`)
|
this.getWeather(`${data.ad_info.adcode}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -73,6 +86,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getWeather (code) {
|
getWeather (code) {
|
||||||
|
|||||||
Reference in New Issue
Block a user