Przeglądaj źródła

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

pm 2 miesięcy temu
rodzic
commit
34f1858d22
1 zmienionych plików z 1 dodań i 3 usunięć
  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);
     }