2323946ce2
1. 移除 API 方法的后缀 2. 公告内容使用 Editor 富文本编辑器 3. 列表的状态检索的修改
38 lines
875 B
TypeScript
38 lines
875 B
TypeScript
import request from '@/config/axios'
|
|
|
|
export interface NoticeVO {
|
|
id: number | undefined
|
|
title: string
|
|
type: number
|
|
content: string
|
|
status: number
|
|
remark: string
|
|
creator: string
|
|
createTime: Date
|
|
}
|
|
|
|
// 查询公告列表
|
|
export const getNoticePage = (params: PageParam) => {
|
|
return request.get({ url: '/system/notice/page', params })
|
|
}
|
|
|
|
// 查询公告详情
|
|
export const getNotice = (id: number) => {
|
|
return request.get({ url: '/system/notice/get?id=' + id })
|
|
}
|
|
|
|
// 新增公告
|
|
export const createNotice = (data: NoticeVO) => {
|
|
return request.post({ url: '/system/notice/create', data })
|
|
}
|
|
|
|
// 修改公告
|
|
export const updateNotice = (data: NoticeVO) => {
|
|
return request.put({ url: '/system/notice/update', data })
|
|
}
|
|
|
|
// 删除公告
|
|
export const deleteNotice = (id: number) => {
|
|
return request.delete({ url: '/system/notice/delete?id=' + id })
|
|
}
|