Skip to content

Commit

Permalink
fix next bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PanJiaChen committed May 25, 2017
1 parent 40eeb55 commit 6ff36d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ router.beforeEach((to, from, next) => {
const roles = res.data.role;
store.dispatch('GenerateRoutes', { roles }).then(() => { // 生成可访问的路由表
router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表
next(to); // hack方法 确保addRoutes已完成
next(to.path); // hack方法 确保addRoutes已完成
})
}).catch(err => {
console.log(err);
Expand Down

0 comments on commit 6ff36d8

Please sign in to comment.