This commit is contained in:
yanran200730
2022-11-03 14:55:37 +08:00
parent cbb0edc14a
commit 0a0dab0ac2
2 changed files with 21 additions and 3 deletions

View File

@@ -50,6 +50,7 @@
</template>
<script>
import { mapActions, mapState } from 'vuex'
var QQMapWX = require('./libs/qqmap-wx-jssdk.js')
export default {
name: 'AppActivity',
@@ -69,6 +70,7 @@
},
computed: {
...mapState(['token']),
isClock () {
if (!this.info.id) {
return false
@@ -115,16 +117,30 @@
},
onLoad (query) {
if (decodeURIComponent(query.scene)) {
this.id = decodeURIComponent(query.scene)
}
if (query.id) {
this.id = query.id
}
if (this.token) {
this.getInfo()
} else {
this.autoLogin()
}
this.qqmapsdk = new QQMapWX({
key: process.env.NODE_ENV == 'production' ? 'RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S' : '3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY'
})
this.$loading()
},
methods: {
...mapActions(['autoLogin']),
getInfo () {
this.$loading()
this.$instance.post(`/api/appactivityinfo/queryDetailById?id=${this.id}`).then(res => {
if (res.code === 0) {
this.info = res.data

View File

@@ -69,6 +69,8 @@
if (this.token) {
this.getUserInfo()
this.getList()
} else {
this.autoLogin()
}
uni.$on('updateUserInfo', () => {