R63 A1-A6:通知中心体验增强

这个提交包含在:
2026-04-14 14:14:10 +08:00
父节点 c90cb165be
当前提交 86644a6766
共修改 7 个文件,包含 570 行新增和 62 行删除
+8
查看文件
@@ -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({}),
});
}