2023-02-11 00:44:00 +08:00
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface NoticeVO {
|
2023-03-12 12:54:28 +08:00
|
|
|
id: number | undefined
|
2023-02-11 00:44:00 +08:00
|
|
|
title: string
|
|
|
|
type: number
|
|
|
|
content: string
|
|
|
|
status: number
|
|
|
|
remark: string
|
|
|
|
creator: string
|
|
|
|
createTime: Date
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询公告列表
|
2023-03-12 18:22:21 +08:00
|
|
|
export const getNoticePage = (params: PageParam) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.get({ url: '/system/notice/page', params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询公告详情
|
2023-03-12 18:22:21 +08:00
|
|
|
export const getNotice = (id: number) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.get({ url: '/system/notice/get?id=' + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增公告
|
2023-03-12 18:22:21 +08:00
|
|
|
export const createNotice = (data: NoticeVO) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.post({ url: '/system/notice/create', data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改公告
|
2023-03-12 18:22:21 +08:00
|
|
|
export const updateNotice = (data: NoticeVO) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.put({ url: '/system/notice/update', data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除公告
|
2023-03-12 18:22:21 +08:00
|
|
|
export const deleteNotice = (id: number) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.delete({ url: '/system/notice/delete?id=' + id })
|
|
|
|
}
|