diff --git a/src/views/form/write/index.vue b/src/views/form/write/index.vue index b3f8979..2a8a612 100644 --- a/src/views/form/write/index.vue +++ b/src/views/form/write/index.vue @@ -104,21 +104,22 @@ export default { this.realName = this.$route.query.realName this.accessKey = this.$route.query.accessKey + console.log('微信传入token') + const token = this.$route.query.token + if (token) { + this.$store.dispatch('user/setTokens', token) + } + + let key = this.$route.query.key || this.$route.params.key this.projectConfig.projectKey = key let wxCode = getQueryString('code') if (wxCode) { this.wxAuthorizationCode = wxCode await this.getWxAuthorizationUserInfo() - console.log('微信传入token') - const token = this.$route.query.token - this.$store.dispatch('user/setTokens', token) - } else { - console.log('微信传入token') - const token = this.$route.query.token - this.$store.dispatch('user/setTokens', token) } + this.getWxAuthorizationUrl() this.queryProjectSettingStatus() this.queryProjectSetting()