notification.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. import request from '@/libs/request';
  11. /**
  12. * @description 获取消息管理列表数据
  13. * @param {Object} param params {Object} 传值参数
  14. */
  15. export function getNotificationList(type) {
  16. return request({
  17. url: `setting/notification/index?type=${type}`,
  18. method: 'get',
  19. });
  20. }
  21. /**
  22. * @description 获取消息管理设置数据获取
  23. * @param {Object} param params {Object} 传值参数
  24. */
  25. export function getNotificationInfo(id, type) {
  26. return request({
  27. url: `setting/notification/info?id=${id}&type=${type}`,
  28. method: 'get',
  29. });
  30. }
  31. /**
  32. * @description 获取消息管理设置数据获取
  33. * @param {Object} param params {Object} 传值参数
  34. */
  35. export function getNotificationSave(data) {
  36. return request({
  37. url: `setting/notification/save`,
  38. method: 'post',
  39. data,
  40. });
  41. }
  42. /**
  43. * @description 设置站内消息
  44. * @param {Number} param id {Number}
  45. */
  46. export function noticeStatus(type, status, id) {
  47. return request({
  48. url: `setting/notification/set_status/${type}/${status}/${id}`,
  49. method: 'put',
  50. });
  51. }