discover.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2025 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 "@/utils/request.js";
  11. /**
  12. * 逛逛分类列表
  13. *
  14. */
  15. export function communityCategoryListApi(){
  16. return request.get('community/category/list',{},{ noAuth : true});
  17. }
  18. /**
  19. * 逛逛推荐作者列表
  20. *
  21. */
  22. export function recommendAuthorListApi(params){
  23. return request.get('community/recommend/author/list',params);
  24. }
  25. /**
  26. * 逛逛话题统计数据
  27. *
  28. */
  29. export function topicCountApi(tid){
  30. return request.get(`community/topic/count/${tid}`);
  31. }
  32. /**
  33. * 逛逛用户主页
  34. *
  35. */
  36. export function userHomeApi(id){
  37. return request.get(`community/user/home/page/${id}`,{},{ noAuth : true});
  38. }
  39. /**
  40. * 逛逛内容作者列表
  41. *
  42. */
  43. export function noteAuthorListApi(authorId){
  44. return request.get(`community/note/author/list/${authorId}`);
  45. }
  46. /**
  47. * 逛逛内容发现列表
  48. *
  49. */
  50. export function discoverListApi(params){
  51. return request.get(`community/note/discover/list`,params,{ noAuth : true});
  52. }
  53. /**
  54. * 逛逛内容关注列表
  55. *
  56. */
  57. export function followListApi(params){
  58. return request.get(`community/note/follow/list`,params);
  59. }
  60. /**
  61. * 逛逛内容评论列表
  62. *
  63. */
  64. export function replyListApi(item){
  65. return request.get(`community/note/reply/list/${item.noteId}?limit=${item.limit}&page=${item.page}`,{},{ noAuth : true});
  66. }
  67. /**
  68. * 逛逛内容列表
  69. *
  70. */
  71. export function topicListApi(params){
  72. return request.get(`community/topic/list?keywords=${params.keywords}&limit=${params.limit}&page=${params.page}`);
  73. }
  74. /**
  75. * 逛逛推荐话题列表
  76. *
  77. */
  78. export function topicRecommendListApi(){
  79. return request.get(`community/topic/recommend/list`);
  80. }
  81. /**
  82. * 逛逛用户内容详情
  83. *
  84. */
  85. export function noteDetailApi(noteId){
  86. return request.get(`community/note/user/detail/${noteId}`,{},{ noAuth : true});
  87. }
  88. /**
  89. * 逛逛内容发现推荐列表
  90. *
  91. */
  92. export function noteRecommendApi(item){
  93. return request.get(`community/note/discover/list/recommend/${item.noteId}?limit=${item.limit}&page=${item.page}`,{},{ noAuth : true});
  94. }
  95. /**
  96. * 创建逛逛内容
  97. *
  98. */
  99. export function noteAddApi(data){
  100. return request.post(`community/note/add`, data);
  101. }
  102. /**
  103. * 编辑逛逛内容
  104. *
  105. */
  106. export function noteUpdateApi(data){
  107. return request.post(`community/note/update`, data);
  108. }
  109. /**
  110. * 逛逛关注/取关作者
  111. *
  112. */
  113. export function followAuthorApi(authorId){
  114. return request.post(`community/concerned/author/${authorId}`);
  115. }
  116. /**
  117. * 逛逛内容点赞/取消
  118. *
  119. */
  120. export function noteLikeApi(noteId){
  121. return request.post(`community/note/like/${noteId}`);
  122. }
  123. /**
  124. * 逛逛内容评论点赞/取消
  125. *
  126. */
  127. export function noteReplyLikeApi(replyId){
  128. return request.post(`community/note/reply/like/${replyId}`);
  129. }
  130. /**
  131. * 我的主页
  132. *
  133. */
  134. export function myHomeApi(){
  135. return request.get(`community/user/my/home/page`);
  136. }
  137. /**
  138. * 我的逛逛列表
  139. *
  140. */
  141. export function myNoteApi(data){
  142. return request.get(`community/note/my/list`,data);
  143. }
  144. /**
  145. * 逛逛内容作者列表
  146. *
  147. */
  148. export function authorNoteApi(authorId, data){
  149. return request.get(`community/note/author/list/${authorId}`,data,{ noAuth : true});
  150. }
  151. /**
  152. * 我的点赞列表
  153. *
  154. */
  155. export function myLikeListApi(params){
  156. return request.get(`community/note/my/like/list`, params);
  157. }
  158. /**
  159. * 我的关注列表
  160. *
  161. */
  162. export function myConcernedListApi(params){
  163. return request.get(`community/user/my/concerned/list`, params);
  164. }
  165. /**
  166. * 逛逛话题内容列表
  167. *
  168. */
  169. export function noteTopicListApi(params){
  170. return request.get(`community/note/topic/list`, params);
  171. }
  172. /**
  173. * 逛逛内容添加评论
  174. *
  175. */
  176. export function myFansListApi(data){
  177. return request.get(`community/user/my/fans/list`, data);
  178. }
  179. /**
  180. * 逛逛内容添加评论
  181. *
  182. */
  183. export function noteReplyAddApi(data){
  184. return request.post(`community/note/reply/add`, data);
  185. }
  186. /**
  187. * 逛逛内容删除
  188. *
  189. */
  190. export function noteDelApi(noteId){
  191. return request.post(`community/note/delete/${noteId}`);
  192. }
  193. /**
  194. * 逛逛内容评论删除
  195. *
  196. */
  197. export function noteReplyDelApi(noteId){
  198. return request.post(`community/note/reply/delete/${noteId}`);
  199. }
  200. /**
  201. * 逛逛内容评论开关
  202. *
  203. */
  204. export function noteReplySwitchApi(noteId){
  205. return request.post(`community/note/reply/switch/${noteId}`);
  206. }
  207. /**
  208. * 逛逛内容编辑个性签名
  209. *
  210. */
  211. export function editSignatureApi(data){
  212. return request.post(`community/user/edit/signature`, data);
  213. }
  214. /**
  215. * 获取逛逛内容评论平台开关设置
  216. *
  217. */
  218. export function replyPlatformSwitchApi(){
  219. return request.get(`community/note/reply/platform/switch/config`);
  220. }
  221. /**
  222. * 逛逛内容评论删除
  223. *
  224. */
  225. export function replyDeleteApi(replyId){
  226. return request.post(`community/note/reply/delete/${replyId}`);
  227. }