From 8851dd8c472541e2e83a58dfa27cf8ce5eb422ca Mon Sep 17 00:00:00 2001 From: yi-ge Date: Thu, 23 Jul 2020 15:04:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0qq=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/auth.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/auth.vue b/pages/auth.vue index 876cf3e..0e7a03c 100644 --- a/pages/auth.vue +++ b/pages/auth.vue @@ -40,13 +40,13 @@ export default { return } - if (state[0] === 'weibo') { - const { data } = await this.$axios.post(`${process.env.baseURL}/visitor/user/weibo`, { + if (state[0] === 'weibo' || state[0] === 'qq') { + const { data } = await this.$axios.post(`${process.env.baseURL}/visitor/user/` + state[0], { code }) if (data.status !== 1) { - this.$toasted.show('微博登录失败,请重试或换用其它登录方式。', { + this.$toasted.show((state[0] === 'weibo' ? '微博' : 'QQ') + '登录失败,请重试或换用其它登录方式。', { position: 'top-center', duration: 5000 })