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 })