style:字典
Showing
2 changed files
with
5 additions
and
6 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: 引入配置文件 | 2 | * @Description: 引入配置文件 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-04-06 14:06:07 | 4 | * @LastEditTime: 2023-04-12 11:12:50 |
5 | --> | 5 | --> |
6 | <!DOCTYPE html> | 6 | <!DOCTYPE html> |
7 | <html> | 7 | <html> |
... | @@ -25,7 +25,6 @@ | ... | @@ -25,7 +25,6 @@ |
25 | </html> | 25 | </html> |
26 | 26 | ||
27 | <script> | 27 | <script> |
28 | console.log(webpackConfig.name, 'webpackConfig.name'); | ||
29 | window.baseUrl = location.origin || location.protocol + '//' + location.host | 28 | window.baseUrl = location.origin || location.protocol + '//' + location.host |
30 | window.timeout = 5000 | 29 | window.timeout = 5000 |
31 | window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6" | 30 | window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6" | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-04-06 11:07:55 | 4 | * @LastEditTime: 2023-04-12 11:15:57 |
5 | */ | 5 | */ |
6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
7 | import router from "./router"; | 7 | import router from "./router"; |
... | @@ -31,6 +31,9 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -31,6 +31,9 @@ router.beforeEach(async (to, from, next) => { |
31 | //请求用户信息 | 31 | //请求用户信息 |
32 | if (!hasUser) { | 32 | if (!hasUser) { |
33 | store.dispatch("user/getUserInfo"); | 33 | store.dispatch("user/getUserInfo"); |
34 | if (!hasAddDict) { | ||
35 | await store.dispatch("dict/generateDic"); | ||
36 | } | ||
34 | } | 37 | } |
35 | if (hasAddRoute) { | 38 | if (hasAddRoute) { |
36 | next(); | 39 | next(); |
... | @@ -46,9 +49,6 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -46,9 +49,6 @@ router.beforeEach(async (to, from, next) => { |
46 | { path: "*", redirect: "/404", hidden: true }, | 49 | { path: "*", redirect: "/404", hidden: true }, |
47 | ]); | 50 | ]); |
48 | const routeTo = Cookies.get("routerTo"); | 51 | const routeTo = Cookies.get("routerTo"); |
49 | if (!hasAddDict) { | ||
50 | await store.dispatch("dict/generateDic"); | ||
51 | } | ||
52 | if (routeTo && routeTo !== "/" && routeTo !== "/sb" && routeTo !== "/jg") { | 52 | if (routeTo && routeTo !== "/" && routeTo !== "/sb" && routeTo !== "/jg") { |
53 | next({ ...to, replace: true }); | 53 | next({ ...to, replace: true }); |
54 | } else { | 54 | } else { | ... | ... |
-
Please register or sign in to post a comment