mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
71 lines
1.4 KiB
JavaScript
71 lines
1.4 KiB
JavaScript
/* 消息的处理 */
|
|
import ajax from '@/utils/xajax.js'
|
|
|
|
/*
|
|
消息分页
|
|
@param pageIndex 第几页
|
|
@param pageSize 每页展示条数
|
|
@param isRead 是否已读
|
|
*/
|
|
const list=function(query){
|
|
return ajax.post('/xboe/sys/message/list',query);
|
|
}
|
|
const mobilelist=function(query){
|
|
return ajax.post('/xboe/sys/message/mobilelist',query);
|
|
}
|
|
// mobilelist
|
|
/*
|
|
删除消息
|
|
@param ids 勾选的多个消息id
|
|
*/
|
|
const del=function(ids){
|
|
return ajax.postJson('/xboe/sys/message/delete',ids);
|
|
}
|
|
/*
|
|
查看当前消息详细信息
|
|
点击查看后如果是未读变成已读
|
|
@param id 当前消息id
|
|
*/
|
|
const detail=function(id){
|
|
return ajax.get('/xboe/sys/message/detail?id=${id}');
|
|
}
|
|
/*发送消息
|
|
*/
|
|
const save=function(data){
|
|
return ajax.postJson('/xboe/sys/message/save',data);
|
|
}
|
|
/*
|
|
当前未读条数 当前用户
|
|
*/
|
|
const isRead=function(){
|
|
return ajax.get('/xboe/sys/message/isRead');
|
|
}
|
|
/*
|
|
批量设置已读 ids
|
|
*/
|
|
const updateIsRead=function(ids){
|
|
return ajax.postJson('/xboe/sys/message/updateIsRead',ids)
|
|
}
|
|
|
|
/**把当前人所有未读消息设置为已读*/
|
|
const readAll=function(){
|
|
return ajax.get('/xboe/sys/message/readall')
|
|
}
|
|
|
|
/**清空当前人的接收到的所有的消息*/
|
|
const cleanAll=function(){
|
|
return ajax.get('/xboe/sys/message/clearall')
|
|
}
|
|
|
|
export default{
|
|
list,
|
|
del,
|
|
detail,
|
|
save,
|
|
isRead,
|
|
updateIsRead,
|
|
readAll,
|
|
cleanAll,
|
|
mobilelist
|
|
}
|