fix: 退出和直接打开登录页都停在用户登录页

This commit is contained in:
2026-11-05 10:21:26 +08:00
parent 81b39d9e09
commit cf63388e8e
4 changed files with 8 additions and 10 deletions
+4 -1
View File
@@ -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";