95 lines
1.4 KiB
JavaScript
95 lines
1.4 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
/**
|
|
* 获取未读信息
|
|
* @returns {AxiosPromise}
|
|
*/
|
|
export function pageByReceive() {
|
|
return request({
|
|
url: '/api/notice/pageByReceive',
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 未读消息数量
|
|
*/
|
|
export function countByReceiveNotRead() {
|
|
return request({
|
|
url: '/api/notice/countByReceiveNotRead',
|
|
method: 'GET'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 标记为已读
|
|
*/
|
|
export function read(id) {
|
|
return request({
|
|
url: '/api/notice/read',
|
|
method: 'post',
|
|
data: id
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 标记为已修改
|
|
*/
|
|
export function deal(id) {
|
|
return request({
|
|
url: '/api/notice/deal',
|
|
method: 'post',
|
|
data: id
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 批量已读
|
|
* @param data
|
|
* @returns {*}
|
|
*/
|
|
export function changeRead(data) {
|
|
return request({
|
|
url: 'api/notice/changeRead',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 查看消息
|
|
*/
|
|
export function findById(id) {
|
|
return request({
|
|
url: '/api/notice/findById',
|
|
method: 'post',
|
|
data: id
|
|
})
|
|
}
|
|
|
|
export function add(data) {
|
|
return request({
|
|
url: 'api/notice',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function del(ids) {
|
|
return request({
|
|
url: 'api/notice/',
|
|
method: 'delete',
|
|
data: ids
|
|
})
|
|
}
|
|
|
|
export function edit(data) {
|
|
return request({
|
|
url: 'api/notice',
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
|
|
export default { add, edit, del, pageByReceive, countByReceiveNotRead, read, findById, deal, changeRead }
|