fix: 退出和直接打开登录页都停在用户登录页
This commit is contained in:
+4
-1
@@ -60,7 +60,10 @@ router.beforeEach(async (to) => {
|
||||
if (!installed && to.path !== "/install") return "/install";
|
||||
if (installed && to.path === "/install") return "/login";
|
||||
if (to.path === "/install") return true;
|
||||
if (hosted && !token()) return enterFromPlatform(to);
|
||||
if (hosted && !token()) {
|
||||
if (to.path === "/login") return true;
|
||||
return enterFromPlatform(to);
|
||||
}
|
||||
if (to.path === "/denied") return token() ? "/" : "/login";
|
||||
if (to.path === "/login") return token() ? "/" : true;
|
||||
if (!token()) return "/login";
|
||||
|
||||
Reference in New Issue
Block a user