Files
BlockChainH5/apis/interfaces/news.js
2021-09-25 10:53:25 +08:00

54 lines
943 B
JavaScript

/**
* 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
}