noticeUser.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { axios } from '@/utils/request'
  2. // 公告 列表 有分页
  3. export const noticeUserList = (params) => {
  4. const url = `/noticeUser/queryLike/${params.pageNo}/${params.pageSize}`
  5. delete params.pageNo
  6. delete params.pageSize
  7. return axios({
  8. url: url,
  9. data: params,
  10. method: 'post',
  11. headers:{
  12. 'module': encodeURIComponent('列表查询')
  13. }
  14. })
  15. }
  16. // 公告 详情
  17. export const noticeUserDetail = (params) => {
  18. const url = `/notice/findById/${params.id}`
  19. return axios({
  20. url: url,
  21. method: 'get',
  22. headers:{
  23. 'module': encodeURIComponent('公告详情')
  24. }
  25. })
  26. }
  27. // 获取通知消息未读数
  28. export const getUnreadCount = params => {
  29. return axios({
  30. url: 'noticeUser/queryNotReadCount',
  31. method: 'post',
  32. headers:{
  33. 'module': encodeURIComponent('获取消息未读数')
  34. }
  35. })
  36. }
  37. // 设置已读消息
  38. export const hasRead = id => {
  39. return axios({
  40. url: `noticeUser/setRead/${id}`,
  41. method: 'get',
  42. headers:{
  43. 'module': encodeURIComponent('设置已读')
  44. }
  45. })
  46. }