mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): support constant route without login status[支持未登录状态下访问自定义的固定路由]
This commit is contained in:
@ -18,7 +18,8 @@ export async function createDynamicRouteGuard(
|
||||
if (!route.isInitAuthRoute) {
|
||||
// 未登录情况下直接回到登录页,登录成功后再加载权限路由
|
||||
if (!isLogin) {
|
||||
if (to.name === routeName('login')) {
|
||||
const toName = to.name as AuthRoute.RouteKey;
|
||||
if (route.isValidConstantRoute(toName) && !to.meta.requiresAuth) {
|
||||
next();
|
||||
} else {
|
||||
const redirect = to.fullPath;
|
||||
|
Reference in New Issue
Block a user