course.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import Request from '../common/request.js';
  2. let request = new Request().http
  3. export function loginByMp(data) {
  4. return request('/app/wx/courseLogin',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  5. }
  6. export function loginByMpH5(data) {
  7. return request('/app/wx/mp/loginByMp',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  8. }
  9. // 获取真实链接
  10. export function getRealLink(data) {
  11. return request('/app/course/getRealLink', data, 'GET','','https://h5api.his.cdwjyyh.com');
  12. }
  13. // h5课程简介
  14. export function getH5CourseByVideoId(data) {
  15. return request('/app/course/getH5CourseByVideoId', data, 'GET','','https://h5api.his.cdwjyyh.com');
  16. }
  17. // h5课程详情加问答
  18. export function getH5CourseVideoDetails(data) {
  19. return request('/app/course/getH5CourseVideoDetails', data, 'GET','','https://h5api.his.cdwjyyh.com');
  20. }
  21. // 答题发红包
  22. export function courseAnswer(data) {
  23. return request('/app/course/courseAnswer', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  24. }
  25. // // 记录看课时间(旧)
  26. // export function getFinishCourseVideo(data) {
  27. // return request('/app/course/getFinishCourseVideo', data, 'POST', 'application/json;charset=UTF-8');
  28. // }
  29. // 记录看课时间(新)
  30. export function getFinishCourseVideo(data) {
  31. return request('/app/course/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  32. }
  33. // 关注客服
  34. export function getIsAddKf(data) {
  35. return request('/app/course/isAddKf', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  36. }
  37. // 流量(缓冲百分比)
  38. export function getInternetTraffic(data) {
  39. return request('/app/course/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  40. }
  41. // 每十分钟获得积分
  42. export function getIntegralByH5Video(data) {
  43. return request('/app/course/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  44. }
  45. // 发送奖励
  46. export function sendReward(data) {
  47. return request('/app/course/sendReward', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  48. }
  49. // 播放错误上报
  50. export function getErrMsg(data) {
  51. return request('/app/course/getErrMsg', data, 'POST', 'application/x-www-form-urlencoded','https://h5api.his.cdwjyyh.com');
  52. }
  53. // 获取getWxConfig
  54. export function getWxConfig(data) {
  55. return request('/app/wx/mp/getWxConfig', data, 'GET','','https://h5api.his.cdwjyyh.com');
  56. }
  57. //获取弹幕列表
  58. export function getDanmuList(videoId) {
  59. return request('/barrage/barrage/list/'+videoId,null,'GET','','https://h5api.his.cdwjyyh.com');
  60. }
  61. // 保存评论数据
  62. export function saveMsg(data, type) {
  63. return request('/app/course/saveMsg', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  64. }
  65. // 撤销评论
  66. export function revokeMsg(data, type) {
  67. return request('/app/course/revokeMsg', data, 'PUT', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  68. }
  69. // 获取历史评论数据
  70. export function getComments(data, type) {
  71. return request('/app/course/getComments', data, 'GET','','https://h5api.his.cdwjyyh.com');
  72. }
  73. // 错误日志未知异常,请联系管理员
  74. export function errorLogUpload(data, type) {
  75. return request('/app/common/errorLogUpload', data, 'POST','','https://h5api.his.cdwjyyh.com');
  76. }
  77. export function getTypeTree(data, type) {
  78. return request('/app/user/complaint/getTypeTree', null, 'GET','','https://h5api.his.cdwjyyh.com');
  79. }
  80. export function complaintRecord(data, type) {
  81. return request('/app/user/complaint/record', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  82. }