notice.js 680 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * 系统通知 API
  3. * 此代码由AI生成
  4. */
  5. import request from '@/utils/request'
  6. /**
  7. * 获取我的通知列表
  8. * @param {Object} query 查询参数
  9. */
  10. export function listMyNotice(query) {
  11. return request({
  12. url: '/system/notice/myList',
  13. method: 'GET',
  14. params: query
  15. })
  16. }
  17. /**
  18. * 标记消息为已读
  19. * @param {number|string} id 消息ID
  20. */
  21. export function readNotice(id) {
  22. return request({
  23. url: `/system/notice/read/${id}`,
  24. method: 'PUT'
  25. })
  26. }
  27. /**
  28. * 标记所有消息为已读
  29. */
  30. export function readAllNotice() {
  31. return request({
  32. url: '/system/notice/readAll',
  33. method: 'PUT'
  34. })
  35. }