index.js 865 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. const { request } = require('../../../api/request')
  2. /**
  3. * 视频点赞
  4. * @param videoId 视频ID
  5. * @returns {Promise<*>}
  6. */
  7. export const postvideoGood = (videoId) => request({
  8. url: '/api/user/video/good',
  9. method: 'POST',
  10. data: {
  11. video_id: videoId
  12. },
  13. showLoading: true
  14. })
  15. /**
  16. * 视频评论
  17. * @param videoId 视频ID
  18. * @param videoComment 评论内容
  19. * @returns {Promise<*>}
  20. */
  21. export const postVideoComment = (videoId, videoComment) => request({
  22. url: '/api/user/video/comment/add',
  23. method: 'POST',
  24. data: {
  25. 'video_id': videoId,
  26. 'video_comment': videoComment
  27. },
  28. showLoading: true
  29. })
  30. /**
  31. * 转发统计
  32. * @param videoId
  33. * @returns {Promise<*>}
  34. */
  35. export const postTransferVideo = (videoId) => request({
  36. url: '/api/user/transfer/video',
  37. method: 'POST',
  38. data: {
  39. 'video_id': videoId
  40. },
  41. showLoading: false
  42. })