community.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2024 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. export function getTopicList() {
  13. return request.get('community/category/lst', {}, {
  14. noAuth: true
  15. });
  16. }
  17. /**已购商品列表*/
  18. export function boughtLstApi(data) {
  19. return request.get('community/pay_product/lst', data);
  20. }
  21. /** 收藏图文列表*/
  22. export function collectLstApi(data) {
  23. return request.get('community/rela_product/lst', data);
  24. }
  25. /** 浏览图文列表*/
  26. export function browseLstApi(data) {
  27. return request.get('community/hist_product/lst', data);
  28. }
  29. /** 发布图文*/
  30. export function createPlantApi(data) {
  31. return request.post('community/create', data);
  32. }
  33. /*图文编辑*/
  34. export function updatePlantApi(id, data) {
  35. return request.post(`community/update/${id}`, data);
  36. }
  37. /*删除图文*/
  38. export function deletePlantApi(id) {
  39. return request.post(`community/delete/${id}`);
  40. }
  41. /** 图文详情*/
  42. export function plantDetailApi(id) {
  43. return request.get(`community/show/${id}`, {}, {
  44. noAuth: true
  45. });
  46. }
  47. /** 订单关联图文商品*/
  48. export function orderAssociatePlantApi(orderId) {
  49. return request.get(`community/order/${orderId}`, {}, {
  50. noAuth: true
  51. });
  52. }
  53. /**评论列表*/
  54. export function replyLstApi(id, data) {
  55. return request.get(`community/${id}/reply`, data, {
  56. noAuth: true
  57. });
  58. }
  59. /**发布评论*/
  60. export function replyCreateApi(id, data) {
  61. return request.post(`community/reply/create/${id}`, data);
  62. }
  63. /**点赞评论*/
  64. export function starCommentApi(id, data) {
  65. return request.post(`community/reply/start/${id}`, data);
  66. }
  67. /**关注用户*/
  68. export function followAuthorApi(id, data) {
  69. return request.post(`community/fans/${id}`, data);
  70. }
  71. /**全部图文列表*/
  72. export function graphicLstApi(data) {
  73. return request.get(`community/lst`, data, {
  74. noAuth: true
  75. });
  76. }
  77. /**视频列表*/
  78. export function videoList(data) {
  79. return request.get(`community/video_lst`, data, {
  80. noAuth: true
  81. });
  82. }
  83. /**自己的视频列表*/
  84. export function myVideoList(id,data) {
  85. return request.get(`community/user/community_video/${id}`, data, {
  86. noAuth: true
  87. });
  88. }
  89. /**文章点赞*/
  90. export function graphicStartApi(id, status) {
  91. return request.post(`community/start/${id}`, status);
  92. }
  93. /**用户详情*/
  94. export function userInfoApi(id) {
  95. return request.get(`community/user/info/${id}`);
  96. }
  97. /**关注人的文章列表*/
  98. export function focusArticleLst(data) {
  99. return request.get(`community/focuslst`, data, {
  100. noAuth: true
  101. });
  102. }
  103. /**用户的文章列表*/
  104. export function userArticleLst(id, data) {
  105. return request.get(`community/user/community/${id}`, data);
  106. }
  107. /**赞过的图文*/
  108. export function starArticleLst(data) {
  109. return request.get(`community/start/lst`, data);
  110. }
  111. /**我的关注*/
  112. export function myFocusLst(data) {
  113. return request.get(`community/focus/lst`, data);
  114. }
  115. /**我的粉丝*/
  116. export function myFansLst(data) {
  117. return request.get(`community/fans/lst`, data);
  118. }
  119. /**热门搜索*/
  120. export function hotSearchLst() {
  121. return request.get(`common/commuunity/hot_keyword`,{}, {
  122. noAuth: true
  123. });
  124. }
  125. /**热门搜索*/
  126. export function graphicProApi(id) {
  127. return request.get(`product/spu/get/${id}`, {}, {
  128. noAuth: true
  129. });
  130. }
  131. /*视频分享二维码*/
  132. export function getVideoCode(id, data) {
  133. return request.get(`community/qrcode/${id}`, data, {
  134. noAuth: true
  135. });
  136. }