From 9b6dc3e8447fccd337394ce811827e45eb6fd2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 21 Jun 2023 17:03:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E8=B7=B3=E8=BD=AC=E7=99=BD=E5=B1=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98(=E4=B8=B4=E6=97=B6=E4=BF=AE=E5=A4=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/SocialLogin/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/components/SocialLogin/index.vue b/src/layout/components/SocialLogin/index.vue index fad8286..127007b 100644 --- a/src/layout/components/SocialLogin/index.vue +++ b/src/layout/components/SocialLogin/index.vue @@ -22,13 +22,13 @@ await socialLogin(source, code, state) .then(async (res) => { if (res.code !== 200) { ElMessage.error(res.msg); - router.go(-2); + location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; return; } loading.value = false; setToken(res.msg); ElMessage.success('登录成功'); - router.go(-2); + location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; }) .catch(() => { loading.value = false;