Commit 6a7124bf authored by Pan's avatar Pan

refine code

parent 25b9a81c
......@@ -27,8 +27,8 @@ router.beforeEach((to, from, next) => {
store.dispatch('GetInfo').then(res => {
const roles = res.data.role;
store.dispatch('GenerateRoutes', { roles }).then(() => {
router.addRoutes(store.getters.addRouters)
next(Object.assign({}, to));
router.addRoutes(store.getters.addRouters);
next({ ...to });
})
})
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment