From 6ff36d82c7b8d7687a551fc5e9f927aab01ba247 Mon Sep 17 00:00:00 2001 From: Pan Date: Thu, 25 May 2017 10:04:19 +0800 Subject: [PATCH] fix next bug --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 8502cbda..aa81cb3b 100644 --- a/src/main.js +++ b/src/main.js @@ -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);