zhanghua
2022-11-16 cc9ddf2ecaf3ad935374f49c842227f7eb15779d
src/views/layout/components/Header/index.vue
@@ -162,7 +162,6 @@
  },
  created() {
    this.setLoginInfo()
    console.log(this.user)
  },
  methods: {
    baseInfo() {
@@ -200,7 +199,6 @@
        sessionStorage.clear();
        this.$router.push({ path: "/login" })
      }).catch(err => {
        console.log(err);
      })
    },
    // 改变选中状态
@@ -217,11 +215,9 @@
    async setLoginInfo() {
      const info = JSON.parse(sessionStorage.getItem('user'));
      if (info) {
        console.log(info)
        this.user = info;
      } else {
        this.user = await this.getLoginInfo();
        console.log(this.user)
      }
      this.show = true
    },