list.ts
1.17 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
53
54
55
56
57
58
59
60
61
62
import axios from "axios";
import qs from "qs";
/**
* 获取通知公告列表
* @param params 查询参数
* @returns 结果
*/
export function listNotice(params: any) {
return axios.get("/system/notice/list", {
params,
paramsSerializer: (obj) => {
return qs.stringify(obj);
}
});
}
/**
* 查询公告详细
* @param id 公告ID
* @returns 结果
*/
export function getNotice(id: any) {
return axios.get("/system/notice/" + id);
}
/**
* 新增公告
* @param data 公告对象
* @returns 0失败 1成功
*/
export function addNotice(data: any) {
return axios.post("/system/notice", data);
}
/**
* 修改全国四级行政区
* @param data 公告对象
* @returns 0失败 1成功
*/
export function updateNotice(data: any) {
return axios.put("/system/notice", data);
}
/**
* 删除公告
* @param id 公告ID
* @returns 0失败 1成功
*/
export function delNotice(id: any) {
return axios.delete("/system/notice/" + id);
}
/**
* 修改公告状态
* @param id id
* @param state 状态
* @returns 0失败 1成功
*/
export function changeNoticeStatus(id: any,state:any) {
return axios.put(`/system/notice/changeStatus/${id}/${state}`);
}