question.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. */
  27. export const apiPubAsk=params=>{
  28. return httpPost('/community/question/ask',params)
  29. }
  30. /**
  31. * 问答列表数量统计
  32. */
  33. export const apiBarTotal=params=>{
  34. return httpGet('/community/question/list/total',params)
  35. }
  36. /**
  37. * 发布回答
  38. * @param question_id
  39. * @param audio_list
  40. */
  41. export const apiReplayAsk=params=>{
  42. return httpPost('/community/question/reply',params)
  43. }
  44. /**
  45. * 问答详情
  46. * @param question_id
  47. */
  48. export const apiGetQuestion=params=>{
  49. return httpGet('/community/question/detail',params)
  50. }
  51. /**
  52. * 我的-未读数
  53. */
  54. export const apiGetUnread=params=>{
  55. return httpGet('/community/question/unread',params)
  56. }
  57. /**
  58. * 问答已读(批量)
  59. * @param question_ids
  60. */
  61. export const apiSetRead = params=>{
  62. return httpPost('/community/question/reply/read',params)
  63. }
  64. /**
  65. * 点击音频次数
  66. * @param community_question_audio_id
  67. * @param source_agent 1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
  68. */
  69. export const apiCountAudioClick = params=>{
  70. return httpPost('/community/question/audio/log',params)
  71. }
  72. /**
  73. * 点赞/吐槽
  74. * "community_question_id": 35,
  75. "op_type": 1, 1-点赞 2-吐槽
  76. "enable": 1, 0取消 1-有效数据
  77. "source_agent": 1, 1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
  78. */
  79. export const apiSetLike = params => {
  80. return httpPost('/community/set_like_or_tease',{ source_agent:1,...params })
  81. }
  82. /**
  83. * 发布评论
  84. * @param {*} params
  85. * "community_question_id": 35,
  86. "content": "这里是roc的测试评论",
  87. "is_show_name": 0,
  88. "source_agent": 1,
  89. */
  90. export const apiPublishComment = params => {
  91. return httpPost('/community/comment',{ source_agent:1,...params })
  92. }
  93. /**
  94. * 获取设置昵称状态
  95. * @param {*} params
  96. */
  97. export const apiCheckNick = params => {
  98. return httpGet('/community/need_anonymous_user_tips')
  99. }
  100. /**
  101. * 不在提醒设置弹窗
  102. * @param {*} params
  103. */
  104. export const apiCanelNickTip = params => {
  105. return httpPost('/community/set_anonymous_user_tips')
  106. }
  107. /**
  108. * 删除留言
  109. * @param {community_question_comment_id} params
  110. */
  111. export const apiDelComment = params => {
  112. return httpPost('/community/comment/delete',params)
  113. }
  114. /**
  115. * 精选留言列表
  116. * @param {*} params
  117. * community_question_id
  118. * curr_page
  119. * page_size
  120. */
  121. export const apiHotComment = params => {
  122. return httpGet('/community/comment/hot',params)
  123. }
  124. /**
  125. * 我的留言列表
  126. * @param {*} params
  127. * community_question_id
  128. * curr_page
  129. * page_size
  130. */
  131. export const apiMyComment = params => {
  132. return httpGet('/community/comment/my',params)
  133. }