改进 登录

This commit is contained in:
ivamp 2023-12-07 21:50:49 +08:00
parent e1db06b126
commit 298e9c005c
2 changed files with 3 additions and 2 deletions

View File

@ -68,7 +68,7 @@ router.beforeEach((to, from) => {
if (to.meta.auth == true) {
// validate login state
if (userStore.jwt_token == null) {
router.push({ path: "auth/login" });
router.push({ name: "login" });
}
} else {
document.title = configStore.getAppName();

View File

@ -102,7 +102,8 @@ const validate = () => {
console.log(userStore.expired_at);
setTimeout(() => {
window.location.href = "/";
// window.location.href = "/";
router.push("/");
}, 100);
}