Browse Source

问题统计

master
huxinglu 4 years ago
parent
commit
2ace77bc2f
2 changed files with 5 additions and 2 deletions
  1. +2
    -1
      src/router/index.js
  2. +3
    -1
      src/views/index/index.vue

+ 2
- 1
src/router/index.js View File

next() next()
} }
} else { } else {
console.log(store.state.user.roles)
if (!store.state.user.roles) { if (!store.state.user.roles) {
if (!store.state.user.info) { if (!store.state.user.info) {
await store.dispatch('user/getInfo') await store.dispatch('user/getInfo')
if (to.name == '403') { if (to.name == '403') {
store.dispatch('user/setIsIndexTag', false) store.dispatch('user/setIsIndexTag', false)
} }
}else{
store.dispatch('user/resetToken')
} }
next() next()
} else { } else {

+ 3
- 1
src/views/index/index.vue View File

created() { created() {
this.browser=this.isIE() this.browser=this.isIE()
this.height = document.body.clientHeight - 120 this.height = document.body.clientHeight - 120
this.filterMenu()
this.pageSize = parseInt((document.body.clientHeight - 344) / 50) this.pageSize = parseInt((document.body.clientHeight - 344) / 50)
this.initConfig() this.initConfig()
this.initPassword() this.initPassword()
return this.$store.state.user.isIndexTag return this.$store.state.user.isIndexTag
}, },
getInfo() { getInfo() {
if(this.$store.state.user.info){
this.filterMenu()
}
return this.$store.state.user.info return this.$store.state.user.info
} }
}, },

Loading…
Cancel
Save