_notice.ts 786 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import Rs from "@@/services/RequestService"
  2. class noticeApi {
  3. tableUrl = "/system/notice/list"
  4. // exportUrl = "/system/notice/export"
  5. // 查询公告列表
  6. listNotice = (query: any) => {
  7. return Rs.get({
  8. url: "/system/notice/list",
  9. params: query,
  10. loading: false
  11. })
  12. }
  13. // 查询公告详细
  14. getNotice = (noticeId: string) => {
  15. return Rs.get({
  16. url: "/system/notice/" + noticeId
  17. })
  18. }
  19. // 新增公告
  20. addNotice = (data: any) => {
  21. return Rs.post({
  22. url: "/system/notice",
  23. data
  24. })
  25. }
  26. // 修改公告
  27. updateNotice = (data: any) => {
  28. return Rs.put({
  29. url: "/system/notice",
  30. data
  31. })
  32. }
  33. // 删除公告
  34. delNotice = (noticeId: string | string[]) => {
  35. return Rs.del({
  36. url: "/system/notice/" + noticeId
  37. })
  38. }
  39. }
  40. export default noticeApi