Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
8eaf8803
authored
2023-04-12 11:16:32 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:字典
1 parent
2c828adb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
public/index.html
src/permission.js
public/index.html
View file @
8eaf880
<!--
* @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"
...
...
src/permission.js
View file @
8eaf880
/*
* @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
{
...
...
Please
register
or
sign in
to post a comment