From dd100d38677706395078dbb5d62f62e0b4c92c6f Mon Sep 17 00:00:00 2001 From: guoyue Date: Tue, 18 Oct 2022 14:11:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E6=B5=B7=E5=B2=B8-=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=EF=BC=9A=E7=82=B9=E5=87=BB=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=88=97=E8=A1=A8=E4=B8=AD=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mynoticeView/components/NoticeList.vue | 22 ++++++------------- .../personalCenter/components/asideMenu.vue | 18 ++++++--------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/front/src/views/mynoticeView/components/NoticeList.vue b/front/src/views/mynoticeView/components/NoticeList.vue index 5b20b970..a129075a 100644 --- a/front/src/views/mynoticeView/components/NoticeList.vue +++ b/front/src/views/mynoticeView/components/NoticeList.vue @@ -262,35 +262,27 @@ const goPage = (item) => { } } } -let isQingDao = whoShow.itShowQingDao; // 更改消息状态 const read = (item) => { if (selectData.value.length === 0 && !item) { - message.error('未选择消息!') - return + return message.error('未选择消息!') } console.log(selectData.value) if (item) { - // 已读状态 + // 已读状态,跳转页面 if (item.readStatus === 1) { - if(isQingDao) { - goPage(item) - } - // 跳转页面 - return + return goPage(item) } mynoticeRead(item.id).then((res) => { if (res.data.code == 0) { message.success('通知已读!') mybus.emit('getMynotice') init() - if (isQingDao) { - // 页面跳转 - setTimeout(() => { - goPage(item) - }, 1000) - } + // 页面跳转 + setTimeout(() => { + goPage(item) + }, 1500) } else { message.error('操作失败!') } diff --git a/front/src/views/personalCenter/components/asideMenu.vue b/front/src/views/personalCenter/components/asideMenu.vue index 46aef41e..d6a6a822 100644 --- a/front/src/views/personalCenter/components/asideMenu.vue +++ b/front/src/views/personalCenter/components/asideMenu.vue @@ -85,19 +85,15 @@ export default defineComponent({ } onMounted(() => { - if (itShowXiHaiAn) { - handleClick(menuList[0]) + if (type) { + console.log('type---------->', type) + let _obj = menuList.find(v => v.key == type) + handleClick(_obj) } else { - if (type) { - console.log('type---------->', type) - let _obj = menuList.find(v => v.key == type) - handleClick(_obj) + if (menuList[1]) { + handleClick(menuList[1]) } else { - if (menuList[1]) { - handleClick(menuList[1]) - }else { - handleClick(menuList[0]) - } + handleClick(menuList[0]) } } })