course.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 getInternetTraffic(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. export function loginByMp(data) {
  52. return request('/app/wx/mp/loginByMp', data, 'POST', 'application/json;charset=UTF-8', 3);
  53. }
  54. // 保存评论数据
  55. export function saveMsg(data, type) {
  56. return request('/saveMsg', data, 'POST', 'application/json;charset=UTF-8', type);
  57. }
  58. // 撤销评论
  59. export function revokeMsg(data, type) {
  60. return request('/revokeMsg', data, 'PUT', 'application/json;charset=UTF-8', type);
  61. }
  62. // 获取历史评论数据
  63. export function getComments(data, type) {
  64. return request('/getComments', data, 'GET', undefined, type);
  65. }