From f4da5d94553deaa5809c6ec9f34a1e03eb709188 Mon Sep 17 00:00:00 2001 From: yige Date: Thu, 23 Jul 2020 08:31:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/auth.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pages/auth.vue b/pages/auth.vue index 772be79..522438a 100644 --- a/pages/auth.vue +++ b/pages/auth.vue @@ -17,7 +17,21 @@ export default { if (!code) { this.notice = '

非法访问,缺少授权参数"code"。



返回首页'; this.$finishLoad(); return } if (type === 'weixin') { + const { data } = await this.$axios.post(`${process.env.baseURL}/visitor/user/weixin`, { + code, + app: 'wx9d5e677f533d1e84' + }) + if (data.status !== 1) { + this.$toasted.show('微信登录失败,请重试或换用其它登录方式。', { + position: 'top-center', + duration: 5000 + }) + return + } + + window.authSuccess(data) + return } const { data } = await this.$axios.post('/visitor/user/auth', {