015a0fbf by 任超

style:字典

1 parent 35bbb8a2
......@@ -24,10 +24,6 @@ router.beforeEach(async (to, from, next) => {
if (!hasUser) {
store.dispatch("user/getUserInfo");
}
//加载字典
if (!hasAddDict) {
store.dispatch("dict/generateDic");
}
if (hasAddRoute) {
next();
} else {
......@@ -42,6 +38,9 @@ router.beforeEach(async (to, from, next) => {
{ path: "*", redirect: "/404", hidden: true },
]);
const routeTo = Cookies.get("routerTo");
if (!hasAddDict) {
await store.dispatch("dict/generateDic");
}
if (routeTo && routeTo !== "/") {
next({ ...to, replace: true });
} else {
......