|
@@ -56,9 +56,8 @@ router.beforeEach(async (to, from, next) => {
|
|
|
tool.data.set("USER_INFO", user.user);
|
|
tool.data.set("USER_INFO", user.user);
|
|
|
} else tool.data.set("OA_USER_INFO", user.user);
|
|
} else tool.data.set("OA_USER_INFO", user.user);
|
|
|
}
|
|
}
|
|
|
- console.log(to)
|
|
|
|
|
- console.log(from)
|
|
|
|
|
- next(to.query.path && to.fullPath.replace("/redirect", to.query.path) || (from.fullPath == "/login" && "/" || from.fullPath == "/login"));
|
|
|
|
|
|
|
+
|
|
|
|
|
+ next(to.query.path && to.fullPath.replace("/redirect", to.query.path) || (from.fullPath == "/login" && "/" || from.fullPath));
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -72,7 +71,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
next();
|
|
next();
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- console.log(to)
|
|
|
|
|
|
|
+
|
|
|
if (to.path === "/login") {
|
|
if (to.path === "/login") {
|
|
|
// 删除路由(替换当前layout路由)
|
|
// 删除路由(替换当前layout路由)
|
|
|
router.addRoute(routes[0]);
|
|
router.addRoute(routes[0]);
|