refine code
This commit is contained in:
		@@ -27,8 +27,8 @@ router.beforeEach((to, from, next) => {
 | 
				
			|||||||
        store.dispatch('GetInfo').then(res => {
 | 
					        store.dispatch('GetInfo').then(res => {
 | 
				
			||||||
          const roles = res.data.role;
 | 
					          const roles = res.data.role;
 | 
				
			||||||
          store.dispatch('GenerateRoutes', { roles }).then(() => {
 | 
					          store.dispatch('GenerateRoutes', { roles }).then(() => {
 | 
				
			||||||
            router.addRoutes(store.getters.addRouters)
 | 
					            router.addRoutes(store.getters.addRouters);
 | 
				
			||||||
            next(Object.assign({}, to));
 | 
					            next({ ...to });
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user