update
1.优化
This commit is contained in:
+4
-2
@@ -50,6 +50,10 @@ const router: Router = createRouter({
|
||||
});
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
debugger;
|
||||
if (to.path !== '/login') {
|
||||
setCurrentPath(to.path);
|
||||
}
|
||||
if (to.path == '/login') {
|
||||
next();
|
||||
} else {
|
||||
@@ -61,7 +65,5 @@ router.beforeEach((to, from, next) => {
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
next();
|
||||
});
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user