update 完成消息盒子功能前后端联动(已读未读在前端浏览器存储)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user