You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.2 KiB

import request from '@/utils/request';
export interface NoticeInfoQuery {
content?: string;
startTime?: string;
endTime?: string;
publishTo?: string;
pageNum?: number;
pageSize?: number;
}
export interface NoticeInfoItem {
id: number;
content: string;
publishTime: string;
displayDays: string;
publishTo: string;
status: string;
}
export interface NoticeInfoResponse {
code: number;
msg: string;
data: {
total: number;
list: NoticeInfoItem[];
};
}
export function listNoticeInfo(query: NoticeInfoQuery) {
return request<NoticeInfoResponse>({
url: '/web/supervision/noticeInfo/list',
method: 'get',
params: query
});
}
export function getNoticeInfo(id: number) {
return request({
url: `/web/supervision/noticeInfo/${id}`,
method: 'get'
});
}
export function addNoticeInfo(data: any) {
return request({
url: '/web/supervision/noticeInfo',
method: 'post',
data
});
}
export function updateNoticeInfo(data: any) {
return request({
url: '/web/supervision/noticeInfo',
method: 'put',
data
});
}
export function deleteNoticeInfo(id: number) {
return request({
url: `/web/supervision/noticeInfo/${id}`,
method: 'delete'
});
}