notice.ets
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import https from './request'
export interface noticeTest {
total: number;
rows: noticeRow[];
code: number;
msg: string;
}
export interface noticeDetailTest {
data: noticeRow;
code: number;
msg: string;
}
export interface noticeRow {
createBy?: string;
createTime?: string;
updateBy?: string;
updateTime?: null | string;
remark?: null;
noticeId?: number;
noticeTitle: string;
noticeType: string;
noticeContent: string;
status?: string;
}
export interface noticeParams {
pageNum: number
pageSize: number
noticeTitle?: string
createBy?: string
status?: string
noticeType?: string
}
// 获取公告列表
export const getNoticeList = (data: noticeParams) => {
return https<noticeTest>({
url: '/system/notice/list',
method: 'get',
params: data
})
}
// 获取公告详情
export const getNoticeDetail = (id: number) => {
return https<noticeDetailTest>({
url: `/system/notice/${id}`,
method: 'get',
})
}