feat(announcement): Popup and pinned

This commit is contained in:
web@ppanel
2024-12-21 00:10:09 +07:00
parent 79621623d5
commit f3680a7020
35 changed files with 465 additions and 351 deletions
-15
View File
@@ -62,21 +62,6 @@ export async function getAnnouncement(
});
}
/** Update announcement enable PUT /v1/admin/announcement/enable */
export async function updateAnnouncementEnable(
body: API.UpdateAnnouncementEnableRequest,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: any }>('/v1/admin/announcement/enable', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** Get announcement list GET /v1/admin/announcement/list */
export async function getAnnouncementList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
+6 -5
View File
@@ -11,8 +11,9 @@ declare namespace API {
id: number;
title: string;
content: string;
enable: boolean;
type: number;
show: boolean;
pinned: boolean;
popup: boolean;
created_at: number;
updated_at: number;
};
@@ -82,7 +83,6 @@ declare namespace API {
type CreateAnnouncementRequest = {
title: string;
content: string;
type: number;
};
type CreateApplicationRequest = {
@@ -823,8 +823,9 @@ declare namespace API {
id: number;
title: string;
content: string;
enable: boolean;
type: number;
show: boolean;
pinned: boolean;
popup: boolean;
};
type UpdateApplicationRequest = {
+4 -2
View File
@@ -3,8 +3,9 @@ declare namespace API {
id: number;
title: string;
content: string;
enable: boolean;
type: number;
show: boolean;
pinned: boolean;
popup: boolean;
created_at: number;
updated_at: number;
};
@@ -321,6 +322,7 @@ declare namespace API {
server: number[];
show: boolean;
sell: boolean;
sort: number;
created_at: number;
updated_at: number;
};