feat: 通知公告(表单)
This commit is contained in:
32
apps/web-antd/src/api/system/notice/index.ts
Normal file
32
apps/web-antd/src/api/system/notice/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { Notice } from './model';
|
||||
|
||||
import type { ID, IDS, PageQuery } from '#/api/common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
enum Api {
|
||||
noticeList = '/system/notice/list',
|
||||
root = '/system/notice',
|
||||
}
|
||||
|
||||
export function noticeList(params?: PageQuery) {
|
||||
return requestClient.get<Notice[]>(Api.noticeList, { params });
|
||||
}
|
||||
|
||||
export function noticeInfo(noticeId: ID) {
|
||||
return requestClient.get<Notice>(`${Api.root}/${noticeId}`);
|
||||
}
|
||||
|
||||
export function noticeAdd(data: any) {
|
||||
return requestClient.postWithMsg<void>(Api.root, data);
|
||||
}
|
||||
|
||||
export function noticeUpdate(data: any) {
|
||||
return requestClient.putWithMsg<void>(Api.root, data);
|
||||
}
|
||||
|
||||
export function noticeRemove(noticeIds: IDS) {
|
||||
return requestClient.deleteWithMsg<void>(
|
||||
`${Api.root}/${noticeIds.join(',')}`,
|
||||
);
|
||||
}
|
11
apps/web-antd/src/api/system/notice/model.d.ts
vendored
Normal file
11
apps/web-antd/src/api/system/notice/model.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface Notice {
|
||||
noticeId: number;
|
||||
noticeTitle: string;
|
||||
noticeType: string;
|
||||
noticeContent: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
createBy: number;
|
||||
createByName: string;
|
||||
createTime: string;
|
||||
}
|
Reference in New Issue
Block a user