activity.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // 活动模块
  2. import { httpGet, httpPost } from "@/utils/request.js";
  3. /**
  4. * 活动列表
  5. * @param {active_state} 活动状态 1-未开始 2-进行中 3-已结束
  6. * @param {activity_type} 活动类型 1-线上会议 3-线下沙龙
  7. * @param {title} 活动类别/标题(搜索可用)
  8. * @param page
  9. * @param limit
  10. */
  11. export const apiActivityList = (params) => {
  12. return httpGet("/activity/getPageList", params);
  13. };
  14. /**
  15. * 活动详情
  16. * @param activity_id
  17. */
  18. export const apiActivityDetail = (params) => {
  19. return httpGet("/activity/getActivityDetail", params);
  20. };
  21. /**
  22. * 活动设置提醒
  23. * @param activity_id
  24. */
  25. export const apiActivityAddRemind = (params) => {
  26. return httpPost("/activity/addRemind", params);
  27. };
  28. /**
  29. * 活动取消提醒
  30. * @param activity_id
  31. */
  32. export const apiActivityCancelRemind = (params) => {
  33. return httpPost("/activity/cancelRemind", params);
  34. };
  35. /**
  36. * 活动线下报名
  37. * @param activity_id
  38. */
  39. export const apiActivityRegister = (params) => {
  40. return httpPost("/activity/registerActivity", params);
  41. };
  42. /**
  43. * 活动取消线下报名
  44. * @param activity_id
  45. */
  46. export const apiActivityCancelRegister = (params) => {
  47. return httpPost("/activity/cancelRegister", params);
  48. };
  49. /**
  50. * 获取活动音频
  51. * @param activity_id
  52. */
  53. export const apiActivityAudios=params=>{
  54. return httpGet('/activity/getActivityVoices',params)
  55. }
  56. /**
  57. * 新增活动音频播放记录
  58. * @param primary_id 音频ID
  59. * @param extend_id 活动ID
  60. * @param source 来源:1-小程序;2-小程序PC端;3-公众号;4-Web PC端
  61. * @param from_page 来源页面:eg:活动详情
  62. */
  63. export const apiActivityAudioPlayRecordAdd=params=>{
  64. return httpPost('/activity/voice_log/add',{...params,source:1})
  65. }
  66. /**
  67. * 新增活动音频播放记录
  68. */
  69. export const apiActivityAudioPlayRecordUpate=params=>{
  70. return httpPost('/activity/voice_log/update',params)
  71. }