소스 검색

问题统计

master
huxinglu 4 년 전
부모
커밋
2ace77bc2f
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -1
      src/router/index.js
  2. +3
    -1
      src/views/index/index.vue

+ 2
- 1
src/router/index.js 파일 보기

@@ -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 {

+ 3
- 1
src/views/index/index.vue 파일 보기

@@ -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
}
},

Loading…
취소
저장