question.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. //问答社区模块
  2. import { httpGet, httpPost } from "@/utils/request.js";
  3. /**
  4. * 问答列表
  5. * @param chart_permission_id
  6. * @param reply_status 0-全部 2-待回答 3-已回答
  7. */
  8. export const apiQuestionList=params=>{
  9. return httpGet('/community/question/list',params)
  10. }
  11. /**
  12. * FICC品种权限
  13. */
  14. export const apiOptionList=params=>{
  15. return httpGet('/company/permission/tree',params)
  16. }
  17. /**
  18. * 研究方向分组列表
  19. */
  20. export const apiOptionGroupList = params=>{
  21. return httpGet('/community/question/research_group',params)
  22. }
  23. /**
  24. * 发布提问
  25. * @param question_content
  26. * @param variety_classify_id
  27. * @param variety_tag_id
  28. */
  29. export const apiPubAsk=params=>{
  30. return httpPost('/community/question/ask',params)
  31. }
  32. /**
  33. * 问答列表数量统计
  34. */
  35. export const apiBarTotal=params=>{
  36. return httpGet('/community/question/list/total',params)
  37. }
  38. /**
  39. * 发布回答
  40. * @param question_id
  41. * @param audio_list
  42. */
  43. export const apiReplayAsk=params=>{
  44. return httpPost('/community/question/reply',params)
  45. }
  46. /**
  47. * 问答详情
  48. * @param question_id
  49. */
  50. export const apiGetQuestion=params=>{
  51. return httpGet('/community/question/detail',params)
  52. }
  53. /**
  54. * 我的-未读数
  55. */
  56. export const apiGetUnread=params=>{
  57. return httpGet('/community/question/unread',params)
  58. }
  59. /**
  60. * 问答已读(批量)
  61. * @param question_ids
  62. */
  63. export const apiSetRead = params=>{
  64. return httpPost('/community/question/reply/read',params)
  65. }
  66. /**
  67. * 点击音频次数
  68. * @param community_question_audio_id
  69. * @param source_agent 1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
  70. */
  71. export const apiCountAudioClick = params=>{
  72. return httpPost('/community/question/audio/log',params)
  73. }
  74. /**
  75. * 点赞/吐槽
  76. * "community_question_id": 35, 问答ID/视频ID
  77. "op_type": 1, 1-点赞 2-吐槽
  78. "enable": 1, 0取消 1-有效数据
  79. "source_agent": 1, 1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
  80. source:来源:1-问答社区(默认, 传0也是); 2-视频社区
  81. */
  82. export const apiSetLike = params => {
  83. return httpPost('/community/set_like_or_tease',{ source_agent:1,...params })
  84. }
  85. /**
  86. * 发布评论
  87. * @param {*} params
  88. * "community_question_id": 35, 问答ID/视频ID
  89. "content": "这里是roc的测试评论",
  90. "is_show_name": 0,
  91. "source_agent": 1,
  92. source 来源:1-问答社区(默认, 传0也是); 2-视频社区
  93. */
  94. export const apiPublishComment = params => {
  95. return httpPost('/community/comment',{ source_agent:1,...params })
  96. }
  97. /**
  98. * 获取设置昵称状态
  99. * @param {*} params
  100. */
  101. export const apiCheckNick = params => {
  102. return httpGet('/community/need_anonymous_user_tips')
  103. }
  104. /**
  105. * 不在提醒设置弹窗
  106. * @param {*} params
  107. */
  108. export const apiCanelNickTip = params => {
  109. return httpPost('/community/set_anonymous_user_tips')
  110. }
  111. /**
  112. * 删除留言
  113. * @param {community_question_comment_id} params
  114. */
  115. export const apiDelComment = params => {
  116. return httpPost('/community/comment/delete',params)
  117. }
  118. /**
  119. * 精选留言列表
  120. * @param {*} params
  121. * community_question_id 问答ID/视频ID
  122. * curr_page
  123. * page_size
  124. * source 来源:1-问答社区(默认, 传0也是); 2-视频社区
  125. */
  126. export const apiHotComment = params => {
  127. return httpGet('/community/comment/hot',params)
  128. }
  129. /**
  130. * 我的留言列表
  131. * @param {*} params
  132. * community_question_id 问答ID/视频ID
  133. * curr_page
  134. * page_size
  135. * source 来源:1-问答社区(默认, 传0也是); 2-视频社区
  136. */
  137. export const apiMyComment = params => {
  138. return httpGet('/community/comment/my',params)
  139. }
  140. /**
  141. * 终止问题
  142. * @param community_question_id
  143. * @param reason
  144. */
  145. export const apiQuestionStop=params=>{
  146. return httpPost('/community/question/stop',params)
  147. }
  148. /**
  149. * 问题转移给其他研究员
  150. * @param community_question_id 问答id
  151. * @param variety_classify_id
  152. * @param variety_tag_id
  153. * @param admin_id
  154. */
  155. export const apiQuestionTransfer=params=>{
  156. return httpPost('/community/question/transfer',params)
  157. }