From 503ea1e25501fbfc75c89903aa347fec48534cba Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Mon, 13 Jul 2026 14:30:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(projects):=20=E6=9C=AA=E8=AF=BB=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=95=B0=E5=AD=97=E5=AF=B9=E4=B8=8D=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global-header/components/notification-bell.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/layouts/modules/global-header/components/notification-bell.vue b/src/layouts/modules/global-header/components/notification-bell.vue index e1b6ab3..f7c1c2f 100644 --- a/src/layouts/modules/global-header/components/notification-bell.vue +++ b/src/layouts/modules/global-header/components/notification-bell.vue @@ -296,12 +296,17 @@ async function onNotifyLinkClick(row: Api.NotifyMessage.NotifyMessage) { async function markAllRead() { const { error } = await fetchUpdateAllNotifyMessageRead(); - if (error) return; + if (error) { + window.$message?.error('全部标记已读失败,请重试'); + return; + } unreadCount.value = 0; resetList('unread'); resetList('read'); loadPage(activeTab.value); + // 以后端真实未读数兜底校准,避免乐观置 0 与后端状态偏差(不必等 15s 轮询) + refreshUnreadCount(); } let pollTimer: ReturnType | null = null; @@ -360,7 +365,7 @@ onBeforeUnmount(() => {