From 071c89da8ad662d0a37a9f3e7924a6966e7ab489 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期五, 08 三月 2024 18:28:17 +0800 Subject: [PATCH] mrshi --- admin/src/components/common/CommonHeader.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue index 58ec6c6..17685f1 100644 --- a/admin/src/components/common/CommonHeader.vue +++ b/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) -- Gitblit v1.9.3