ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
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
import { defHttp } from '#/api/request';
 
enum Api {
  NoticePrefix = '/api/message/Notice',
  Prefix = '/api/message',
}
 
// 获取系统公告列表
export function getNoticeList(data) {
  return defHttp.post({ url: `${Api.NoticePrefix}/List`, data });
}
// 新建公告
export function create(data) {
  return defHttp.post({ url: Api.NoticePrefix, data });
}
// 修改公告
export function update(data) {
  return defHttp.put({ url: `${Api.NoticePrefix}/${data.id}`, data });
}
// 获取公告详情
export function getInfo(id) {
  return defHttp.get({ url: `${Api.NoticePrefix}/${id}` });
}
// 删除公告
export function delNotice(id) {
  return defHttp.delete({ url: `${Api.NoticePrefix}/${id}` });
}
// 发布公告
export function release(id) {
  return defHttp.put({ url: `${Api.NoticePrefix}/${id}/Actions/Release` });
}
 
// 获取消息中心列表
export function getMessageList(data) {
  return defHttp.get({ url: Api.Prefix, data });
}
// 全部已读
export function readAllMsg(data) {
  return defHttp.post({ url: `${Api.Prefix}/Actions/ReadAll`, data });
}
// 查看消息内容
export function readInfo(id) {
  return defHttp.get({ url: `${Api.Prefix}/ReadInfo/${id}` });
}
// 删除消息
export function delMsgRecord(data) {
  return defHttp.delete({ url: `${Api.Prefix}/Record`, data });
}
 
// 获取IM对话列表
export function getIMReply(data) {
  return defHttp.get({ url: `${Api.Prefix}/imreply`, data });
}
// 删除聊天记录
export function deleteChatRecord(id) {
  return defHttp.delete({ url: `${Api.Prefix}/imreply/deleteChatRecord/${id}` });
}
// 移除聊天记录
export function removeChatRecord(id) {
  return defHttp.delete({ url: `${Api.Prefix}/imreply/relocation/${id}` });
}