28 lines
743 B
TypeScript
Raw Normal View History

2022-11-03 16:55:01 +08:00
import request from '@/config/axios'
2022-07-18 19:06:37 +08:00
import type { NoticeVO } from './types'
// 查询公告列表
2022-07-19 22:33:54 +08:00
export const getNoticePageApi = (params) => {
return request.get({ url: '/system/notice/page', params })
2022-07-18 19:06:37 +08:00
}
// 查询公告详情
export const getNoticeApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/notice/get?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 新增公告
2022-07-19 22:33:54 +08:00
export const createNoticeApi = (data: NoticeVO) => {
return request.post({ url: '/system/notice/create', data })
2022-07-18 19:06:37 +08:00
}
// 修改公告
2022-07-19 22:33:54 +08:00
export const updateNoticeApi = (data: NoticeVO) => {
return request.put({ url: '/system/notice/update', data })
2022-07-18 19:06:37 +08:00
}
// 删除公告
export const deleteNoticeApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.delete({ url: '/system/notice/delete?id=' + id })
2022-07-18 19:06:37 +08:00
}