course.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. import Request from '../common/request.js';
  2. let request = new Request().http
  3. export function H5logoinApp(data) {
  4. return request('/course_register/app/wx/mp/mpByLogin',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  5. }
  6. export function handleFsUserWx(data) {
  7. return request('/course_register/app/wx/handleFsUserWx', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  8. }
  9. export function registerQwFsUserFinish(data) {
  10. return request('/course_register/app/course/registerQwFsUserFinish', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  11. }
  12. export function isAddCompanyUser(data) {
  13. return request('/course_register/app/course/registerQwFsUser', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  14. }
  15. export function loginByMp(data) {
  16. return request('/app/wx/courseLogin',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  17. }
  18. // 获取真实链接
  19. export function getRealLink(data) {
  20. return request('/app/course/getRealLink', data, 'GET','','https://h5api.his.cdwjyyh.com');
  21. }
  22. // h5课程简介
  23. export function getH5CourseByVideoId(data) {
  24. return request('/app/course/getH5CourseByVideoId', data, 'GET','','https://h5api.his.cdwjyyh.com');
  25. }
  26. // h5课程详情加问答
  27. export function getH5CourseVideoDetails(data) {
  28. return request('/app/course/getH5CourseVideoDetails', data, 'GET','','https://h5api.his.cdwjyyh.com');
  29. }
  30. // 答题发红包
  31. export function courseAnswer(data) {
  32. return request('/app/course/courseAnswer', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  33. }
  34. // // 记录看课时间(旧)
  35. // export function getFinishCourseVideo(data) {
  36. // return request('/app/course/getFinishCourseVideo', data, 'POST', 'application/json;charset=UTF-8');
  37. // }
  38. // 记录看课时间(新)
  39. export function getFinishCourseVideo(data) {
  40. return request('/app/course/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  41. }
  42. // 关注客服
  43. export function getIsAddKf(data) {
  44. return request('/app/course/isAddKf', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  45. }
  46. // 流量(缓冲百分比)
  47. export function internetTraffic(data) {
  48. return request('/app/course/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  49. }
  50. // 每十分钟获得芳华币
  51. export function getIntegralByH5Video(data) {
  52. return request('/app/course/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  53. }
  54. // 发送奖励
  55. export function sendReward(data) {
  56. return request('/app/course/sendReward', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  57. }
  58. // 播放错误上报
  59. export function getErrMsg(data) {
  60. return request('/app/course/getErrMsg', data, 'POST', 'application/x-www-form-urlencoded','https://h5api.his.cdwjyyh.com');
  61. }
  62. // 获取getWxConfig
  63. export function getWxConfig(data) {
  64. return request('/app/wx/mp/getWxConfig', data, 'GET','','https://h5api.his.cdwjyyh.com');
  65. }
  66. //获取弹幕列表
  67. export function getDanmuList(videoId) {
  68. return request('/barrage/barrage/list/'+videoId,null,'GET','','https://h5api.his.cdwjyyh.com');
  69. }
  70. // 保存评论数据
  71. export function saveMsg(data) {
  72. return request('/app/course/saveMsg', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  73. }
  74. // 撤销评论
  75. export function revokeMsg(data) {
  76. return request('/app/course/revokeMsg', data, 'PUT', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  77. }
  78. // 获取历史评论数据
  79. export function getComments(data) {
  80. return request('/app/course/getComments', data, 'GET','','https://h5api.his.cdwjyyh.com');
  81. }
  82. // 错误日志未知异常,请联系管理员
  83. export function errorLogUpload(data) {
  84. return request('/app/common/errorLogUpload', data, 'POST','','https://h5api.his.cdwjyyh.com');
  85. }
  86. export function getTypeTree(data) {
  87. return request('/app/user/complaint/getTypeTree', null, 'GET','','https://h5api.his.cdwjyyh.com');
  88. }
  89. export function complaintRecord(data) {
  90. return request('/app/user/complaint/record', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  91. }
  92. export function uploadOSS(data) {
  93. return request('/app/common/uploadOSS', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  94. }
  95. // 公开课
  96. export function getAppletCourse(data) {
  97. return request('/app/course/getAppletCourse', null, 'GET','','https://h5api.his.cdwjyyh.com');
  98. }
  99. export function getAppletCourseVideo(data) {
  100. return request('/app/course/getAppletCourseVideo', data, 'GET','','https://h5api.his.cdwjyyh.com');
  101. }
  102. export function getConfigByKey(data) {
  103. return request('/app/common/getConfigByKey',data,'GET','','https://h5api.his.cdwjyyh.com');
  104. }
  105. // 获取芳华币礼品
  106. export function getCourseIntegralGoods(data) {
  107. return request('/app/course/getCourseIntegralGoods', null, 'GET','','https://h5api.his.cdwjyyh.com');
  108. }
  109. export function claim(data) {
  110. return request('/app/course/rewardRound/claim', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  111. }
  112. export function isClaim(data) {
  113. return request('/app/course/rewardRound/isClaim', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  114. }
  115. export function getVideoRewardTypes(data) {
  116. return request('/app/course/getVideoRewardTypes', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  117. }
  118. export function getVideoRewardRules(data) {
  119. return request('/app/course/getVideoRewardRules', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  120. }
  121. export function getUserPhoneDeviceType(data) {
  122. return request('/app/pop/getUserPhoneDeviceType', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  123. }
  124. //检查是否有头像以及昵称
  125. export function checkUserInfo(data) {
  126. return request('/app/user/checkUserInfo',data,'GET','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  127. }
  128. //更改用户头像以及昵称
  129. export function editUser(data) {
  130. return request('/app/user/editUser',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  131. }
  132. export function getLuckyBagInfo(data) {
  133. return request('/app/luckyBag/getLuckyBagInfo',data,'GET','','https://h5api.his.cdwjyyh.com');
  134. }
  135. export function receiveLuckyBag(data) {
  136. return request('/app/luckyBag/receiveLuckyBag', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
  137. }