修改用户退出后记录退出路径重定向不是欢迎界面问题
This commit is contained in:
parent
7b47fa447a
commit
657aebdc99
|
@ -141,7 +141,6 @@ export function createPermissionGuard(router: Router) {
|
||||||
// update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
|
// update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
|
||||||
redirect: to.fullPath,
|
redirect: to.fullPath,
|
||||||
// update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
|
// update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
next(redirectData);
|
next(redirectData);
|
||||||
|
@ -189,11 +188,13 @@ export function createPermissionGuard(router: Router) {
|
||||||
|
|
||||||
if (to.name === PAGE_NOT_FOUND_ROUTE.name) {
|
if (to.name === PAGE_NOT_FOUND_ROUTE.name) {
|
||||||
// 动态添加路由后,此处应当重定向到fullPath,否则会加载404页面内容
|
// 动态添加路由后,此处应当重定向到fullPath,否则会加载404页面内容
|
||||||
next({ path: to.fullPath, replace: true, query: to.query });
|
//next({ path: to.fullPath, replace: true, query: to.query });
|
||||||
|
next({ path: PageEnum.BASE_HOME, replace: true, query: to.query });
|
||||||
} else {
|
} else {
|
||||||
const redirectPath = (from.query.redirect || to.path) as string;
|
const redirectPath = (from.query.redirect || to.path) as string;
|
||||||
const redirect = decodeURIComponent(redirectPath);
|
const redirect = decodeURIComponent(redirectPath);
|
||||||
const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect };
|
//const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect };
|
||||||
|
const nextData = PageEnum.BASE_HOME;
|
||||||
next(nextData);
|
next(nextData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue