MrShi
2024-03-08 071c89da8ad662d0a37a9f3e7924a6966e7ab489
admin/src/components/common/CommonHeader.vue
@@ -2,7 +2,7 @@
  <div class="common-header">
    <div class="header">
      <div class="logo">
        <div> 华晟园区</div>
        <div>{{title}}</div>
        <!-- <div class="title-en">Diagnosis of Intelligent Manufacturing Integrated Service Platfrom</div> -->
      </div>
      <div class="user">
@@ -55,6 +55,7 @@
  },
  data () {
    return {
      title: process.env.VUE_APP_TITLE,
      visible: {
        // 修改密码
        changePwd: false
@@ -104,7 +105,7 @@
    }
  },
  methods: {
    ...mapMutations(['setUserInfo', 'switchCollapseMenu']),
    ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo']),
    // 修改密码
    changePwd () {
      this.visible.changePwd = true
@@ -148,8 +149,10 @@
    logout () {
      logout()
        .then(() => {
          this.setUserInfo(null)
          this.$router.push({ name: 'login' })
          this.clearUserInfo()
          // window.location.href = process.env.VUE_APP_CONTEXT_PATH
          // this.$router.push({ name: 'login' })
          window.location.reload()
        })
        .catch(e => {
          this.$tip.apiFailed(e)