Skip to content

Commit 1c852db

Browse files
dingyi1993PanJiaChen
authored andcommitted
fix:fix undone NProgress.
1 parent 9463c50 commit 1c852db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/permission.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ router.beforeEach((to, from, next) => {
1818
if (getToken()) { // 判断是否有token
1919
if (to.path === '/login') {
2020
next({ path: '/' })
21+
NProgress.done()
2122
} else {
2223
if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
2324
store.dispatch('GetUserInfo').then(res => { // 拉取user_info
@@ -37,6 +38,7 @@ router.beforeEach((to, from, next) => {
3738
next()//
3839
} else {
3940
next({ path: '/401', query: { noGoBack: true }})
41+
NProgress.done()
4042
}
4143
// 可删 ↑
4244
}

0 commit comments

Comments
 (0)