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