apiNotification.js 584 B

1234567891011121314151617181920212223
  1. import { del, get, post } from "./http";
  2. const prefix = 'devicesApi/notification/';
  3. export default {
  4. getUnreadTotal() {
  5. return get(prefix + "tobe-read-count")
  6. },
  7. /**
  8. * 查询通知列表
  9. * @param {String} notificationId 最后一个列表对象的Id(用于分页)
  10. * @returns
  11. */
  12. getNotificationList(notificationId) {
  13. return get(prefix + "alerts", {notificationId})
  14. },
  15. readMessage(notificationId) {
  16. return get(prefix + "read-alert", {notificationId})
  17. },
  18. deleteMessage(notificationId) {
  19. return del(prefix + "alerts/" + notificationId)
  20. }
  21. }