hailu
2023-09-13 6c16ee94138c0ced056202e0e917ad4b5efb0462
优化
2个文件已修改
11 ■■■■■ 已修改文件
src/router/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/login/loginHeader.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -79,6 +79,8 @@
    // 未登陆且要跳转的页面是白名单
    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);
src/view/login/loginHeader.vue
@@ -387,7 +387,14 @@
    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)