trainingApi.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. import http from "@/api/http.js"
  2. /* 培训管理模块 */
  3. //标签管理
  4. export const TagInterface = {
  5. /**
  6. * 获取标签列表
  7. * @param {Object} params
  8. * @param {Number} params.PageSize
  9. * @param {Number} params.CurrentIndex
  10. * @param {String} params.Keyword
  11. * @returns
  12. */
  13. getTagList:(params)=>{
  14. return http.get('/eta_training_video/tag/page_list',params)
  15. },
  16. /**
  17. * 新增标签
  18. * @param {Object} params
  19. * @param {String} params.TagName
  20. * @returns
  21. */
  22. addTag:(params)=>{
  23. return http.post('/eta_training_video/tag/add',params)
  24. },
  25. /**
  26. * 编辑标签
  27. * @param {Object} params
  28. * @param {Number} params.TagId
  29. * @param {String} params.TagName
  30. * @returns
  31. */
  32. editTag:(params)=>{
  33. return http.post('/eta_training_video/tag/edit',params)
  34. },
  35. /**
  36. * 删除标签
  37. * @param {Object} params
  38. * @param {Number} params.TagId
  39. * @returns
  40. */
  41. deleteTag:(params)=>{
  42. return http.post('/eta_training_video/tag/remove',params)
  43. }
  44. }
  45. //分类管理
  46. export const ClassifyInterface = {
  47. /**
  48. * 获取分类列表
  49. * @param {Object} params
  50. * @param {Number} params.Keyword
  51. * @returns
  52. */
  53. getClassifyList:(params)=>{
  54. return http.get('/eta_training_video/classify/tree',params)
  55. },
  56. /**
  57. * 新增分类
  58. * @param {Object} params
  59. * @param {Number} params.ParentId
  60. * @param {String} params.ClassifyName
  61. * @returns
  62. */
  63. addClassify:(params)=>{
  64. return http.post('/eta_training_video/classify/add',params)
  65. },
  66. /**
  67. * 编辑分类
  68. * @param {Object} params
  69. * @param {Number} params.ParentId
  70. * @param {Number} params.ClassifyId
  71. * @param {String} params.ClassifyName
  72. * @returns
  73. */
  74. editClassify:(params)=>{
  75. return http.post('/eta_training_video/classify/edit',params)
  76. },
  77. /**
  78. * 删除分类
  79. * @param {Object} params
  80. * @param {Number} params.ClassifyId
  81. * @returns
  82. */
  83. deleteClassify:(params)=>{
  84. return http.post('/eta_training_video/classify/remove',params)
  85. }
  86. }
  87. //视频管理
  88. export const VideoInterface = {
  89. /**
  90. * 获取视频列表
  91. * @param {Object} params
  92. * @param {Number} params.PageSize
  93. * @param {Number} params.CurrentIndex
  94. * @param {String} params.Keyword
  95. * @param {String} params.StartTime
  96. * @param {String} params.EndTime
  97. * @param {Number} params.ClassifyId
  98. * @param {String} params.TagIds 标签IDs, 英文逗号拼接
  99. * @param {Number} params.PublishState 发布状态:1-未发布;2-已发布
  100. * @returns
  101. */
  102. getVideoList:(params)=>{
  103. return http.get('/eta_training_video/page_list',params)
  104. },
  105. /**
  106. * 新增视频
  107. * @param {Object} params
  108. * @param {String} params.Title
  109. * @param {String} params.Introduce
  110. * @param {String} params.CoverImg
  111. * @param {String} params.VideoUrl
  112. * @param {Number} params.ClassifyId
  113. * @param {Array} params.TagIds
  114. * @returns
  115. */
  116. addVideo:(params)=>{
  117. return http.post('/eta_training_video/add',params)
  118. },
  119. /**
  120. * 编辑视频
  121. * @param {Object} params
  122. * @param {Number} params.VideoId
  123. * 其他同上
  124. * @returns
  125. */
  126. editVideo:(params)=>{
  127. return http.post('/eta_training_video/edit',params)
  128. },
  129. /**
  130. * 发布/取消发布视频
  131. * @param {Object} params
  132. * @param {Number} params.VideoId
  133. * @param {Number} params.PublishState 发布状态:0-取消发布;1-发布
  134. * @returns
  135. */
  136. publishVideo:(params)=>{
  137. return http.post('/eta_training_video/publish',params)
  138. },
  139. /**
  140. * 删除视频
  141. * @param {Object} params
  142. * @param {Number} params.VideoId
  143. * @returns
  144. */
  145. deleteVideo:(params)=>{
  146. return http.post('/eta_training_video/remove',params)
  147. },
  148. /**
  149. * 获取视频详情
  150. * @param {Object} params
  151. * @param {Number} params.VideoId
  152. * @returns
  153. */
  154. getVideoDetail:(params)=>{
  155. return http.get('/eta_training_video/detail',params)
  156. }
  157. }