feat: 对接前端,完成通知公告
This commit is contained in:
@@ -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}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user