From affae930e0176fe5e2aa1ea6cc3a6755d2828d4a Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 29 Dec 2022 15:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/modules.js | 1 + src/project/fengdu/AppVote/voteDetail.vue | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/modules.js b/src/common/modules.js index f9ea1266..715162bf 100644 --- a/src/common/modules.js +++ b/src/common/modules.js @@ -205,6 +205,7 @@ let timer = {} const oauth2Weixin = params => { const redirect = qs.parseUrl(location.href) delete redirect.query.code + delete redirect.query.state return qs.stringifyUrl({ url: "https://open.weixin.qq.com/connect/oauth2/authorize", query: { diff --git a/src/project/fengdu/AppVote/voteDetail.vue b/src/project/fengdu/AppVote/voteDetail.vue index 83a4b0fc..75eb79ab 100644 --- a/src/project/fengdu/AppVote/voteDetail.vue +++ b/src/project/fengdu/AppVote/voteDetail.vue @@ -18,6 +18,7 @@ export default { appName: "投票详情", computed: { ...mapState(['user']), + wxCode: v => v.$route.query.code }, data() { return { @@ -42,12 +43,15 @@ export default { } }) } else {//已登录,直接投票 - + console.log("投票") } }, }, onShow() { this.getDetail() + if (!!this.wxCode) { + this.getWechatToken({module: "AppVote", code: this.wxCode}).then(this.handleVote) + } } }