fix: 系统用户登录主页重复刷新问题

This commit is contained in:
TsMask
2025-08-14 19:49:22 +08:00
parent 5edb5932b5
commit aed81672a2
2 changed files with 7 additions and 9 deletions

View File

@@ -9,6 +9,8 @@ import advancedFormat from 'dayjs/plugin/advancedFormat';
import useLayoutStore from '@/store/modules/layout';
import useAppStore from '@/store/modules/app';
import useI18n from '@/hooks/useI18n';
import { CACHE_LOCAL_PROCONFIG } from './constants/cache-keys-constants';
import { localRemove } from './utils/cache-local-utils';
const { t, currentLocale } = useI18n();
const { themeConfig, initPrimaryColor, changeConf } = useLayoutStore();
dayjs.extend(advancedFormat);
@@ -34,6 +36,7 @@ onBeforeMount(() => {
maxCount: 15,
});
initPrimaryColor();
localRemove(CACHE_LOCAL_PROCONFIG);
// 输出应用版本号
const appStore = useAppStore();

View File

@@ -3,7 +3,6 @@ import Index from '@/views/index/tenantIndex.vue';
import { getConfigKey } from '@/api/system/config';
import {
defineAsyncComponent,
nextTick,
onMounted,
ref,
shallowRef,
@@ -50,14 +49,10 @@ onMounted(() => {
useLayoutStore().changeConf('menuTheme', 'light');
useLayoutStore().changeConf('tabRender', false);
} else {
useLayoutStore().changeConf('layout', 'mix');
useLayoutStore().changeConf('menuTheme', 'light');
useLayoutStore().changeConf('tabRender', true);
// location.replace(location.origin);
router.replace({ name: 'Monitor_2087' }).finally(() => {
nextTick(() => location.reload());
});
// currentComponent.value = defineAsyncComponent(
// () => import('@/views/dashboard/overview/index.vue')
// );
router.replace({ name: 'Monitor_2087' });
return;
useLayoutStore().changeConf('layout', 'mix');
//获取当前系统设置的首页路径