Browse Source

fix 修复 三方调用跳转白屏问题(临时修复)

疯狂的狮子Li 1 year ago
parent
commit
18dd68edd5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/layout/components/SocialLogin/index.vue

+ 2 - 2
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;