@@ -76,7 +76,6 @@ router.beforeEach(async (to, from, next) => { | |||
next() | |||
} | |||
} else { | |||
console.log(store.state.user.roles) | |||
if (!store.state.user.roles) { | |||
if (!store.state.user.info) { | |||
await store.dispatch('user/getInfo') | |||
@@ -113,6 +112,8 @@ router.beforeEach(async (to, from, next) => { | |||
if (to.name == '403') { | |||
store.dispatch('user/setIsIndexTag', false) | |||
} | |||
}else{ | |||
store.dispatch('user/resetToken') | |||
} | |||
next() | |||
} else { |
@@ -222,7 +222,6 @@ | |||
created() { | |||
this.browser=this.isIE() | |||
this.height = document.body.clientHeight - 120 | |||
this.filterMenu() | |||
this.pageSize = parseInt((document.body.clientHeight - 344) / 50) | |||
this.initConfig() | |||
this.initPassword() | |||
@@ -248,6 +247,9 @@ | |||
return this.$store.state.user.isIndexTag | |||
}, | |||
getInfo() { | |||
if(this.$store.state.user.info){ | |||
this.filterMenu() | |||
} | |||
return this.$store.state.user.info | |||
} | |||
}, |