course.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. // return request('/app/wx/courseLogin',data,'POST','application/json;charset=UTF-8','http://192.168.10.135:8113');
  6. }
  7. // 获取真实链接
  8. export function getRealLink(data) {
  9. return request('/app/course/getRealLink', data, 'GET','','https://h5api.his.cdwjyyh.com');
  10. }
  11. // h5课程简介
  12. export function getH5CourseByVideoId(data) {
  13. return request('/app/course/getH5CourseByVideoId', data, 'GET','','https://h5api.his.cdwjyyh.com');
  14. }
  15. // h5课程详情加问答
  16. export function getH5CourseVideoDetails(data) {
  17. return request('/app/course/getH5CourseVideoDetails', data, 'GET','','https://h5api.his.cdwjyyh.com');
  18. }
  19. // 答题发红包
  20. export function courseAnswer(data) {
  21. return request('/app/course/courseAnswer', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  22. }
  23. // // 记录看课时间(旧)
  24. // export function getFinishCourseVideo(data) {
  25. // return request('/app/course/getFinishCourseVideo', data, 'POST', 'application/json;charset=UTF-8');
  26. // }
  27. // 记录看课时间(新)
  28. export function getFinishCourseVideo(data) {
  29. return request('/app/course/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  30. }
  31. // 关注客服
  32. export function getIsAddKf(data) {
  33. return request('/app/course/isAddKf', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  34. }
  35. // 流量(缓冲百分比)
  36. export function internetTraffic(data) {
  37. return request('/app/course/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  38. }
  39. // 每十分钟获得芳华币
  40. export function getIntegralByH5Video(data) {
  41. return request('/app/course/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  42. }
  43. // 发送奖励
  44. export function sendReward(data) {
  45. return request('/app/course/sendReward', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  46. }
  47. // 播放错误上报
  48. export function getErrMsg(data) {
  49. return request('/app/course/getErrMsg', data, 'POST', 'application/x-www-form-urlencoded','https://h5api.his.cdwjyyh.com');
  50. }
  51. // 获取getWxConfig
  52. export function getWxConfig(data) {
  53. return request('/app/wx/mp/getWxConfig', data, 'GET','','https://h5api.his.cdwjyyh.com');
  54. }
  55. //获取弹幕列表
  56. export function getDanmuList(videoId) {
  57. return request('/barrage/barrage/list/'+videoId,null,'GET','','https://h5api.his.cdwjyyh.com');
  58. }
  59. // 保存评论数据
  60. export function saveMsg(data, type) {
  61. return request('/app/course/saveMsg', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  62. }
  63. // 撤销评论
  64. export function revokeMsg(data, type) {
  65. return request('/app/course/revokeMsg', data, 'PUT', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  66. }
  67. // 获取历史评论数据
  68. export function getComments(data, type) {
  69. return request('/app/course/getComments', data, 'GET','','https://h5api.his.cdwjyyh.com');
  70. }
  71. // 错误日志未知异常,请联系管理员
  72. export function errorLogUpload(data, type) {
  73. return request('/app/common/errorLogUpload', data, 'POST','','https://h5api.his.cdwjyyh.com');
  74. }
  75. export function getTypeTree(data, type) {
  76. return request('/app/user/complaint/getTypeTree', null, 'GET','','https://h5api.his.cdwjyyh.com');
  77. }
  78. export function complaintRecord(data, type) {
  79. return request('/app/user/complaint/record', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  80. }
  81. export function uploadOSS(data, type) {
  82. return request('/app/common/uploadOSS', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  83. }
  84. // 公开课
  85. export function getAppletCourse(data, type) {
  86. return request('/app/course/getAppletCourse', null, 'GET','','https://h5api.his.cdwjyyh.com');
  87. }
  88. export function getAppletCourseVideo(data, type) {
  89. return request('/app/course/getAppletCourseVideo', data, 'GET','','https://h5api.his.cdwjyyh.com');
  90. }
  91. export function getConfigByKey(data, type) {
  92. return request('/app/common/getConfigByKey',data,'GET','','https://h5api.his.cdwjyyh.com');
  93. }
  94. // 获取芳华币礼品
  95. export function getCourseIntegralGoods(data,type) {
  96. return request('/app/course/getCourseIntegralGoods', null, 'GET','','https://h5api.his.cdwjyyh.com');
  97. }
  98. export function claim(data, type) {
  99. return request('/app/course/rewardRound/claim', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  100. }
  101. export function isClaim(data, type) {
  102. return request('/app/course/rewardRound/isClaim', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  103. }
  104. export function getVideoRewardTypes(data, type) {
  105. return request('/app/course/getVideoRewardTypes', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  106. }
  107. export function getVideoRewardRules(data, type) {
  108. return request('/app/course/getVideoRewardRules', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  109. }
  110. export function getUserPhoneDeviceType(data, type) {
  111. return request('/app/pop/getUserPhoneDeviceType', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  112. }