fix[permission]: set NProgress.done #79
This commit is contained in:
		@@ -11,6 +11,7 @@ router.beforeEach((to, from, next) => {
 | 
				
			|||||||
  if (getToken()) {
 | 
					  if (getToken()) {
 | 
				
			||||||
    if (to.path === '/login') {
 | 
					    if (to.path === '/login') {
 | 
				
			||||||
      next({ path: '/' })
 | 
					      next({ path: '/' })
 | 
				
			||||||
 | 
					      NProgress.done() // if current page is dashboard will not trigger	afterEach hook, so manually handle it
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      if (store.getters.roles.length === 0) {
 | 
					      if (store.getters.roles.length === 0) {
 | 
				
			||||||
        store.dispatch('GetInfo').then(res => { // 拉取用户信息
 | 
					        store.dispatch('GetInfo').then(res => { // 拉取用户信息
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user