update 完成消息盒子功能前后端联动(已读未读在前端浏览器存储)

This commit is contained in:
疯狂的狮子Li
2026-03-27 14:34:38 +08:00
parent 5907e4778b
commit ebc7760de2
10 changed files with 200 additions and 30 deletions

View File

@@ -20,6 +20,7 @@ export const NOTICE_GROUP = {
} as const;
export interface PushMessagePayload {
messageId?: string | number;
type?: string;
source?: string;
message?: string;
@@ -36,6 +37,7 @@ export const parsePushMessage = (raw: string): PushMessagePayload => {
return {
type: payload.type ?? PUSH_MESSAGE_TYPE.MESSAGE,
source: payload.source ?? 'backend',
messageId: payload.messageId,
message: payload.message ?? '',
data: payload.data ?? null,
path: payload.path,
@@ -45,6 +47,7 @@ export const parsePushMessage = (raw: string): PushMessagePayload => {
return {
type: PUSH_MESSAGE_TYPE.MESSAGE,
source: 'backend',
messageId: undefined,
message: raw,
data: null,
path: undefined,