From 37aa14939110b5579a4ea50c55acbb02f34d3412 Mon Sep 17 00:00:00 2001 From: lhzzforever Date: Fri, 31 May 2024 11:04:06 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E5=8F=98=E6=9B=B4=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E7=BB=AD=E6=9C=9Fsource=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/router/index.js | 4 ++-- frontend/src/views/perm/group-perm-renewal/index.vue | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index fc2814042..7f8e8770d 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -170,7 +170,7 @@ export const beforeEach = async (to, from, next) => { } if (['applyJoinUserGroup', 'applyCustomPerm', 'myManageSpace', 'myPerm', 'permTransfer', 'permRenewal'].includes(to.name) - || (['permRenewal'].includes(to.name) && to.query.source === 'email')) { + || (['permRenewal'].includes(to.name) && ['email', 'notification'].includes(to.query.source))) { await store.dispatch('role/updateCurrentRole', { id: 0 }); await store.dispatch('userInfo'); curRole = 'staff'; @@ -232,7 +232,7 @@ export const beforeEach = async (to, from, next) => { } } else { // 邮件点击续期跳转过来的链接需要做身份的前置判断 - if (to.name === 'groupPermRenewal' && to.query.source === 'email' && currentRoleId) { + if (to.name === 'groupPermRenewal' && ['email', 'notification'].includes(to.query.source) && currentRoleId) { await getManagerInfo(); navDiffMenuIndex(1); } diff --git a/frontend/src/views/perm/group-perm-renewal/index.vue b/frontend/src/views/perm/group-perm-renewal/index.vue index 14f0192fe..8fd5343e5 100644 --- a/frontend/src/views/perm/group-perm-renewal/index.vue +++ b/frontend/src/views/perm/group-perm-renewal/index.vue @@ -355,7 +355,7 @@ id: item.id }; const { current_role_id: currentRoleId, source } = this.$route.query; - if (currentRoleId && source === 'email') { + if (currentRoleId && ['email', 'notification'].includes(source)) { params.hidden = false; } const { data } = await this.$store.dispatch('renewal/getExpireSoonGroupMembers', params); @@ -390,7 +390,7 @@ expire_soon: true }; const { current_role_id: currentRoleId, source } = this.$route.query; - if (currentRoleId && source === 'email') { + if (currentRoleId && ['email', 'notification'].includes(source)) { params.hidden = false; } const { data } = await this.$store.dispatch('memberTemplate/getGroupSubjectTemplate', params); @@ -419,7 +419,7 @@ offset: this.pagination.limit * (this.pagination.current - 1) }; const { current_role_id: currentRoleId, source } = this.$route.query; - if (currentRoleId && source === 'email') { + if (currentRoleId && ['email', 'notification'].includes(source)) { params.hidden = false; } const { code, data } = await this.$store.dispatch('renewal/getExpiredGroups', params); @@ -631,7 +631,7 @@ : checkList.map(({ id, type }) => ({ id, type })) }; const { current_role_id: currentRoleId, source } = this.$route.query; - if (currentRoleId && source === 'email') { + if (currentRoleId && ['email', 'notification'].includes(source)) { params.hidden = false; } const { code } = await this.$store.dispatch('userGroup/deleteUserGroupMember', params); @@ -836,7 +836,7 @@ })) }; const { current_role_id: currentRoleId, source } = this.$route.query; - if (currentRoleId && source === 'email') { + if (currentRoleId && ['email', 'notification'].includes(source)) { params.hidden = false; } console.log(params, '参数');