|
@@ -104,6 +104,10 @@ function setupAccessGuard(router: Router) {
|
|
});
|
|
});
|
|
const path =
|
|
const path =
|
|
to.path === DEFAULT_PATH ? preferences.app.defaultHomePath : to.path;
|
|
to.path === DEFAULT_PATH ? preferences.app.defaultHomePath : to.path;
|
|
|
|
+ const redirect =
|
|
|
|
+ decodeURIComponent(<string>from.query.redirect) === DEFAULT_PATH
|
|
|
|
+ ? void 0
|
|
|
|
+ : from.query.redirect;
|
|
|
|
|
|
if (!userInfo.homePath) {
|
|
if (!userInfo.homePath) {
|
|
userStore.updateHomePath(
|
|
userStore.updateHomePath(
|
|
@@ -115,7 +119,7 @@ function setupAccessGuard(router: Router) {
|
|
accessStore.setAccessMenus(accessibleMenus);
|
|
accessStore.setAccessMenus(accessibleMenus);
|
|
accessStore.setAccessRoutes(accessibleRoutes);
|
|
accessStore.setAccessRoutes(accessibleRoutes);
|
|
accessStore.setIsAccessChecked(true);
|
|
accessStore.setIsAccessChecked(true);
|
|
- const redirectPath = (from.query.redirect ??
|
|
|
|
|
|
+ const redirectPath = (redirect ??
|
|
(path === preferences.app.defaultHomePath
|
|
(path === preferences.app.defaultHomePath
|
|
? userInfo.homePath ||
|
|
? userInfo.homePath ||
|
|
preferences.app.defaultHomePath ||
|
|
preferences.app.defaultHomePath ||
|