8eaf8803 by renchao@pashanhoo.com

style:字典

1 parent 2c828adb
<!--
* @Description: 引入配置文件
* @Autor: renchao
* @LastEditTime: 2023-04-06 14:06:07
* @LastEditTime: 2023-04-12 11:12:50
-->
<!DOCTYPE html>
<html>
......@@ -25,7 +25,6 @@
</html>
<script>
console.log(webpackConfig.name, 'webpackConfig.name');
window.baseUrl = location.origin || location.protocol + '//' + location.host
window.timeout = 5000
window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-04-06 11:07:55
* @LastEditTime: 2023-04-12 11:15:57
*/
import Vue from 'vue'
import router from "./router";
......@@ -31,6 +31,9 @@ router.beforeEach(async (to, from, next) => {
//请求用户信息
if (!hasUser) {
store.dispatch("user/getUserInfo");
if (!hasAddDict) {
await store.dispatch("dict/generateDic");
}
}
if (hasAddRoute) {
next();
......@@ -46,9 +49,6 @@ 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 !== "/" && routeTo !== "/sb" && routeTo !== "/jg") {
next({ ...to, replace: true });
} else {
......