From 1c4458ec503cc2b44546d0cec5e90f8c2178116c Mon Sep 17 00:00:00 2001 From: zhoulingpo Date: Wed, 26 Apr 2023 10:31:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=BC=E8=88=AA=E4=B8=8D=E5=87=BA=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header.vue | 14 +++++++++----- src/utils/request.js | 4 ---- src/views/Layout.vue | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index f198717..f853da7 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -55,15 +55,22 @@ export default { popoverValue: false } }, + props:{ + menuAllDate:{ + type:Array + } + }, computed: { ...mapGetters({ menuData: 'menuData' }), isSystemManager () { - return this.menuData.some(menu => menu.id === 'AVL9YSB7ZF') + console.log(this.menuData,"this.menuData") + return this.menuAllDate.some(menu => menu.id === 'AVL9YSB7ZF') }, isSystemManagerBelong () { - return this.menuData.some(menu => menu.id === 'AVL9YSB7ZF' && menu.belong == 1) + console.log(this.menuData,"isSystemManager") + return this.menuAllDate.some(menu => menu.id === 'AVL9YSB7ZF' && menu.belong == 1) } }, methods: { @@ -77,9 +84,6 @@ export default { this.$api.login.logout().then(_ => { this.$message.success('退出成功') this.$store.commit('saveUserInfo', null) - this.$store.commit('savePathUrl', null) - this.$store.commit('saveMenuName', null) - this.$store.commit('saveMenuData', null) this.$store.commit('setHandleProcess', null) // var sevice = "http://"+window.location.host+"/"; // var serviceUrl = encodeURIComponent(sevice); diff --git a/src/utils/request.js b/src/utils/request.js index ce4c35d..d8d8bc2 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -89,8 +89,6 @@ instance.interceptors.response.use(function (response) { store.commit('saveUserInfo', null) store.commit('saveUserInfo', null) store.commit('savePathUrl', null) - store.commit('saveMenuName', null) - store.commit('saveMenuData', null) store.commit('setHandleProcess', null) router.push('/login') Message.error('登录超时过期') @@ -106,8 +104,6 @@ instance.interceptors.response.use(function (response) { store.commit('saveUserInfo', null) store.commit('saveUserInfo', null) store.commit('savePathUrl', null) - store.commit('saveMenuName', null) - store.commit('saveMenuData', null) store.commit('setHandleProcess', null) router.push('/login') Message.error('登录超时过期') diff --git a/src/views/Layout.vue b/src/views/Layout.vue index ed38b00..0c58e73 100644 --- a/src/views/Layout.vue +++ b/src/views/Layout.vue @@ -1,8 +1,7 @@