Normalize legacy home redirects

This commit is contained in:
2026-06-09 18:45:02 +08:00
parent 39aa708c4f
commit f8bdc3e952
6 changed files with 49 additions and 33 deletions
+1 -8
View File
@@ -4,7 +4,6 @@ import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { LOGIN_PATH } from '@vben/constants';
import { preferences } from '@vben/preferences';
import { resetAllStores, useAccessStore, useUserStore } from '@vben/stores';
import { defineStore } from 'pinia';
@@ -12,13 +11,7 @@ import { defineStore } from 'pinia';
import { getAccessCodesApi, loginApi, logoutApi } from '#/api/core/auth';
import { getUserInfoApi } from '#/api/core/user';
import { $t } from '#/locales';
function normalizeHomePath(path?: null | string) {
if (!path || path === '/page-render/main_home') {
return preferences.app.defaultHomePath;
}
return path;
}
import { normalizeHomePath } from '#/utils/legacy-home';
export const useAuthStore = defineStore('auth', () => {
const accessStore = useAccessStore();