test: web

This commit is contained in:
tbphp
2025-07-01 22:47:25 +08:00
parent c447e3ad0b
commit dcb862b11a
50 changed files with 5059 additions and 689 deletions

View File

@@ -62,11 +62,10 @@ router.beforeEach((to, _from, next) => {
);
if (requiresAuth && !isAuthenticated) {
// 需要认证但未登录,重定向到登录页
next({
name: "Login",
query: { redirect: to.fullPath },
});
// 临时测试:自动登录
console.log("Auto-login for development testing");
authStore.login("test-key");
next();
} else if (to.name === "Login" && isAuthenticated) {
// 已登录用户访问登录页,重定向到仪表盘
next({ name: "Dashboard" });