From 10c0ef4b0b9796b7bafa10527b33aeb37d855248 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 24 Sep 2021 16:39:37 +0800 Subject: [PATCH] =?UTF-8?q?token=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/form/write/index.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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()