R63 A1-A6:通知中心体验增强
这个提交包含在:
@@ -24,6 +24,7 @@ export type NotificationListQuery = {
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
unreadOnly?: boolean;
|
||||
type?: string;
|
||||
};
|
||||
|
||||
function toQueryString(query: NotificationListQuery) {
|
||||
@@ -31,6 +32,7 @@ function toQueryString(query: NotificationListQuery) {
|
||||
if (query.page != null) params.set("page", String(query.page));
|
||||
if (query.pageSize != null) params.set("pageSize", String(query.pageSize));
|
||||
if (query.unreadOnly != null) params.set("unreadOnly", query.unreadOnly ? "1" : "0");
|
||||
if (query.type) params.set("type", query.type);
|
||||
const qs = params.toString();
|
||||
return qs ? `?${qs}` : "";
|
||||
}
|
||||
@@ -49,3 +51,9 @@ export async function markNotificationRead(notificationId: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export async function markAllNotificationsRead() {
|
||||
return apiRequestData<{ updatedCount: number }>("/api/notifications/mark-all-read", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户