course.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import Request from '../common/request.js';
  2. let request = new Request().http
  3. // 获取真实链接
  4. export function getRealLink(data, type) {
  5. return request('/getRealLink', data, 'GET', undefined, type);
  6. }
  7. // h5课程简介
  8. export function getH5CourseByVideoId(data, type) {
  9. return request('/getH5CourseByVideoId', data, 'GET', undefined, type);
  10. }
  11. // h5课程详情加问答
  12. export function getH5CourseVideoDetails(data, type) {
  13. return request('/getH5CourseVideoDetails', data, 'GET', undefined, type);
  14. }
  15. // 答题发红包
  16. export function courseAnswer(data, type) {
  17. return request('/courseAnswer', data, 'POST', 'application/json;charset=UTF-8', type);
  18. }
  19. // // 记录看课时间(旧)
  20. // export function getFinishCourseVideo(data,type) {
  21. // return request('/getFinishCourseVideo', data, 'POST', 'application/json;charset=UTF-8',type);
  22. // }
  23. // 记录看课时间(新)
  24. export function getFinishCourseVideo(data, type) {
  25. return request('/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8', type);
  26. }
  27. // 关注客服
  28. export function getIsAddKf(data, type) {
  29. return request('/isAddKf', data, 'POST', 'application/json;charset=UTF-8', type);
  30. }
  31. // 流量(缓冲百分比)
  32. export function internetTraffic(data, type) {
  33. return request('/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8', type);
  34. }
  35. // 每十分钟获得积分
  36. export function getIntegralByH5Video(data, type) {
  37. return request('/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8', type);
  38. }
  39. // 发送奖励
  40. export function sendReward(data, type) {
  41. return request('/sendReward', data, 'POST', 'application/json;charset=UTF-8', type);
  42. }
  43. // 播放错误上报
  44. export function getErrMsg(data, type) {
  45. return request('/getErrMsg', data, 'POST', 'application/x-www-form-urlencoded', type);
  46. }
  47. // 获取getWxConfig
  48. export function getWxConfig(data, type) {
  49. return request('/app/wx/mp/getWxConfig', data, 'GET', undefined, 3);
  50. }
  51. // app发送奖励
  52. export function sendAppReward(data,type) {
  53. return request('/sendAppReward', data, 'POST', 'application/json;charset=UTF-8',type);
  54. }
  55. // 获取积分礼品
  56. export function getCourseIntegralGoods(data,type) {
  57. return request('/getCourseIntegralGoods', null, 'GET',undefined,type);
  58. }
  59. export function loginByMp(data) {
  60. return request('/app/wx/mp/loginByMp', data, 'POST', 'application/json;charset=UTF-8', 3);
  61. }
  62. // 保存评论数据
  63. export function saveMsg(data, type) {
  64. return request('/saveMsg', data, 'POST', 'application/json;charset=UTF-8', type);
  65. }
  66. // 撤销评论
  67. export function revokeMsg(data, type) {
  68. return request('/revokeMsg', data, 'PUT', 'application/json;charset=UTF-8', type);
  69. }
  70. // 获取历史评论数据
  71. export function getComments(data, type) {
  72. return request('/getComments', data, 'GET', undefined, type);
  73. }