feat: 对接前端,完成通知公告

This commit is contained in:
陈淳
2024-02-20 15:34:29 +08:00
parent d2ae803ecc
commit f7f8bad301
12 changed files with 235 additions and 66 deletions

View File

@@ -3,16 +3,16 @@ import request from '@/utils/request'
// 查询公告列表
export function listNotice(query) {
return request({
url: '/system/notice/list',
url: '/notice',
method: 'get',
params: query
})
}
// 查询公告详细
export function getNotice(noticeId) {
export function getNotice(id) {
return request({
url: '/system/notice/' + noticeId,
url: `/notice/${id}`,
method: 'get'
})
}
@@ -20,26 +20,26 @@ export function getNotice(noticeId) {
// 新增公告
export function addNotice(data) {
return request({
url: '/system/notice',
url: '/notice',
method: 'post',
data: data
})
}
// 修改公告
export function updateNotice(data) {
export function updateNotice(id,data) {
return request({
url: '/system/notice',
url: `/notice/${id}`,
method: 'put',
data: data
})
}
// 删除公告
export function delNotice(noticeId) {
export function delNotice(ids) {
return request({
url: '/system/notice',
url: `/notice`,
method: 'delete',
params:{id:noticeId}
params:{id:ids}
})
}