notice 重构补充:

1. 移除 API 方法的后缀
2. 公告内容使用 Editor 富文本编辑器
3. 列表的状态检索的修改
This commit is contained in:
YunaiV
2023-03-12 18:22:21 +08:00
parent 42421f509f
commit 2323946ce2
6 changed files with 22 additions and 348 deletions

View File

@ -11,32 +11,27 @@ export interface NoticeVO {
createTime: Date
}
export interface NoticePageReqVO extends PageParam {
title?: string
status?: number
}
// 查询公告列表
export const getNoticePageApi = (params: NoticePageReqVO) => {
export const getNoticePage = (params: PageParam) => {
return request.get({ url: '/system/notice/page', params })
}
// 查询公告详情
export const getNoticeApi = (id: number) => {
export const getNotice = (id: number) => {
return request.get({ url: '/system/notice/get?id=' + id })
}
// 新增公告
export const createNoticeApi = (data: NoticeVO) => {
export const createNotice = (data: NoticeVO) => {
return request.post({ url: '/system/notice/create', data })
}
// 修改公告
export const updateNoticeApi = (data: NoticeVO) => {
export const updateNotice = (data: NoticeVO) => {
return request.put({ url: '/system/notice/update', data })
}
// 删除公告
export const deleteNoticeApi = (id: number) => {
export const deleteNotice = (id: number) => {
return request.delete({ url: '/system/notice/delete?id=' + id })
}