소스 검색

修复消息通知数字变化问题

pm 2 달 전
부모
커밋
34f1858d22
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/components/MessageNotification.tsx

+ 1 - 3
src/components/MessageNotification.tsx

@@ -26,13 +26,11 @@ export default function MessageNotification() {
     }
   };
 
-  // 获取未读消息列表
+  // 获取未读消息列表(仅用于悬浮框展示,不改变顶部未读数量;未读数量以 get-unread-count 接口为准)
   const getUnreadList = async () => {
     try {
       const list = await in_site.getUnreadList();
       setMessageList(list || []);
-      // 同时更新未读数量
-      setUnreadCount(list?.length || 0);
     } catch (error) {
       console.error('获取未读消息列表失败:', error);
     }