Browse Source

refine code

Pan 7 years ago
parent
commit
6a7124bf9c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main.js

+ 2 - 2
src/main.js

27
         store.dispatch('GetInfo').then(res => {
27
         store.dispatch('GetInfo').then(res => {
28
           const roles = res.data.role;
28
           const roles = res.data.role;
29
           store.dispatch('GenerateRoutes', { roles }).then(() => {
29
           store.dispatch('GenerateRoutes', { roles }).then(() => {
30
-            router.addRoutes(store.getters.addRouters)
31
-            next(Object.assign({}, to));
30
+            router.addRoutes(store.getters.addRouters);
31
+            next({ ...to });
32
           })
32
           })
33
         })
33
         })
34
       } else {
34
       } else {