Ver código fonte

退出登录重定向

Alfyn 2 semanas atrás
pai
commit
593c313eda
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      src/permission.js

+ 2 - 1
src/permission.js

@@ -127,7 +127,8 @@ router.beforeEach(async (to, from, next) => {
       // 在免登录名单,直接进入
       next()
     } else {
-      next({ path: loginRoutePath, query: { redirect: to.fullPath } })
+      window.location.href = `https://dev.autocde.com/login?redirect=${to.fullPath}`;
+      // next({ path: loginRoutePath, query: { redirect: to.fullPath } })
       NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
     }
   }