| | |
| | | // 未登陆且要跳转的页面是白名单 |
| | | next() // 跳转 |
| | | // 跳转 |
| | | }else if(!token && nameList.indexOf(to.name) < 0){ |
| | | store.commit('openloginModal', true) |
| | | } else { |
| | | if (store.state.user.hasGetInfo) { |
| | | // console.log(store.state.user.hasGetInfo,to, store.state.user.access); |
| | |
| | | methods: { |
| | | chooseRoute(e) { |
| | | if (e.disabled == true) { |
| | | this.$store.commit('openloginModal', true) |
| | | |
| | | if (this.$store.state.user.token) { |
| | | localStorage.setItem('powerAccess', e.url) |
| | | this.$router.push(e.url) |
| | | } else { |
| | | this.$store.commit('openloginModal', true) |
| | | } |
| | | |
| | | } else { |
| | | localStorage.setItem('powerAccess', e.url) |
| | | this.$router.push(e.url) |