src/permission.ts
@@ -53,7 +53,9 @@ '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee' '/oauthLogin/gitee', '/calling-screen-big', '/calling-screen-room' ] // 路由加载前 @@ -61,14 +63,15 @@ console.info("router.beforeEach to: " + to.fullPath + " from: " + from.fullPath) start() loadStart() if (!getAccessToken()) { if (whiteList.indexOf(to.path) !== -1) { next() return } else { } if (!getAccessToken()) { next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 return } } if (to.path === '/login') {