消息中心

This commit is contained in:
2021-09-25 10:53:25 +08:00
parent 220b7b3d3e
commit 2d0fbac73b
4 changed files with 496 additions and 1 deletions

53
apis/interfaces/news.js Normal file
View File

@@ -0,0 +1,53 @@
/**
* Web-zdx
* moduleName: 通知消息列表
*/
import {request} from '../index.js'
// 消息列表
const notificationsType = () => {
return request({
url: 'notifications',
method: 'GET'
})
}
// 根据type 获取具体消息列表
const notificationsList = (type,data) => {
return request({
url: 'notifications/'+type+'/list',
method: 'GET',
data:data
})
}
// 根据type 全部已读
const notificationsReaded = (type) => {
return request({
url: 'notifications/'+type,
method: 'PUT'
})
}
// 根据type 全部已读
const notificationsDelete= () => {
return request({
url: 'notifications',
method: 'DELETE'
})
}
// 根据消息id获取消息详情
const notificationsDetail= (id) => {
return request({
url: 'notifications/'+id,
method: 'get'
})
}
export {
notificationsType,
notificationsList,
notificationsDetail,
notificationsReaded,
notificationsDelete
}