notice.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import request from '@/utils/request'
  2. // 查询公告列表
  3. export function listNotice (query) {
  4. return request({
  5. url: '/system/notice/page',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询公告详细
  11. export function getNotice (noticeId) {
  12. return request({
  13. url: '/system/notice/' + noticeId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增公告
  18. export function saveNotice (data) {
  19. return request({
  20. url: '/system/notice',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 删除公告
  26. export function delNotice (noticeId) {
  27. return request({
  28. url: '/system/notice/' + noticeId,
  29. method: 'delete'
  30. })
  31. }
  32. // 查看页面查询公告详细
  33. export function getNoticeView (noticeId) {
  34. return request({
  35. url: '/system/notice/getNoticeView/' + noticeId,
  36. method: 'get'
  37. })
  38. }
  39. // 查询个人公告阅读列表
  40. export function listNoticeByUser (query) {
  41. return request({
  42. url: '/system/notice/listNoticeByUser/page',
  43. method: 'get',
  44. params: query
  45. })
  46. }
  47. // 新增公告
  48. export function updateNoticeToRead (noticeIds) {
  49. return request({
  50. url: '/system/notice/updateNoticeToRead/' + noticeIds,
  51. method: 'put'
  52. })
  53. }