Skip to content

Commit 6ff36d8

Browse files
committed
fix next bug
1 parent 40eeb55 commit 6ff36d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ router.beforeEach((to, from, next) => {
5252
const roles = res.data.role;
5353
store.dispatch('GenerateRoutes', { roles }).then(() => { // 生成可访问的路由表
5454
router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表
55-
next(to); // hack方法 确保addRoutes已完成
55+
next(to.path); // hack方法 确保addRoutes已完成
5656
})
5757
}).catch(err => {
5858
console.log(err);

0 commit comments

Comments
 (0)