feat: 调整布局
This commit is contained in:
@@ -87,7 +87,12 @@ router.beforeEach((to: any, from: any, next: any) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (token && to.path !== "/home") {
|
||||
if (token && to.path === "/login") {
|
||||
next({ path: "/home" });
|
||||
return;
|
||||
}
|
||||
|
||||
if (token && to.path === "/") {
|
||||
next({ path: "/home" });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user