voice.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // 语音播报模块
  2. import { httpGet, httpPost } from "@/utils/request.js";
  3. /**
  4. * 语音列表
  5. * @param page_index
  6. * @param page_size
  7. * @param broadcast_id 语音id
  8. * @param section_id 板块id
  9. * @param author_id 作者ID(我的语音播报列表)
  10. * @param mine_status 语音播报状态:0-未发布 1-已发布 2-全部(我的语音播报列表)
  11. */
  12. export const apiVoiceList=params=>{
  13. return httpPost('/voice/broadcast/list',params)
  14. }
  15. /**
  16. * 语音板块列表
  17. */
  18. export const apiVoiceSectionList=()=>{
  19. return httpGet('/voice/broadcast/section/list',{})
  20. }
  21. /**
  22. * 删除语音
  23. * @param broadcast_id
  24. */
  25. export const apiVoiceDel=params=>{
  26. return httpGet('/voice/broadcast/delete',params)
  27. }
  28. /**
  29. * 播放记录
  30. * @param broadcast_id
  31. * @param source 来源平台:1:小程序、2:小程序(pc)、3:公众号、4:官网web(pc)
  32. */
  33. export const apiVoicePlayRecord=params=>{
  34. return httpPost('/voice/broadcast/statistics/add',{...params,source:1})
  35. }
  36. /**
  37. * 语音详情
  38. * @param broadcast_id
  39. */
  40. export const apiVoiceDetail=params=>{
  41. return httpGet('/voice/broadcast/detail',params)
  42. }
  43. /**
  44. * 推送客群、模板消息
  45. * @param broadcast_id
  46. */
  47. export const apiVoiceSendMsg=params=>{
  48. return httpPost('/voice/broadcast/msg_send',params)
  49. }
  50. /**
  51. * 新增语音
  52. * @param broadcast_name 语音标题
  53. * @param section_id 板块ID
  54. * @param section_name 板块名称
  55. * @param variety_id 品种ID
  56. * @param variety_name 品种名称
  57. * @param author_id 作者ID
  58. * @param author 作者名称
  59. * @param imgs 图片:英文逗号拼接
  60. * @param voice_seconds 音频时长
  61. * @param voice_size 音频大小
  62. * @param voice_url 音频地址
  63. * @param central_arguments 核心观点
  64. */
  65. export const apiVoiceAdd=params=>{
  66. return httpPost('/voice/broadcast/add',params)
  67. }
  68. /**
  69. * 编辑语音
  70. * @param broadcast_id 语音播报ID
  71. * @param broadcast_name 语音标题
  72. * @param section_id 板块ID
  73. * @param section_name 板块名称
  74. * @param variety_id 品种ID
  75. * @param variety_name 品种名称
  76. * @param author_id 作者ID
  77. * @param author 作者名称
  78. * @param imgs 图片:英文逗号拼接
  79. * @param voice_seconds 音频时长
  80. * @param voice_size 音频大小
  81. * @param voice_url 音频地址
  82. * @param central_arguments 核心观点
  83. */
  84. export const apiVoiceEdit=params=>{
  85. return httpPost('/voice/broadcast/edit',params)
  86. }
  87. /**
  88. * 发布语音
  89. * @param broadcast_id 语音播报ID
  90. * @param publish_type 发布类型:1-发布 2-定时发布
  91. * @param pre_publish_time 预发布时间(类型为定时发布时必填)
  92. */
  93. export const apiVoicePublish=params=>{
  94. return httpPost('/voice/broadcast/publish',params)
  95. }
  96. /**
  97. * 我的语音数量统计
  98. * @param author_id
  99. */
  100. export const apiMyVoiceCount=params=>{
  101. return httpGet('/voice/broadcast/list_count',params)
  102. }