curriculum.api.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. import { httpAxios_gym, httpAxios_gyt } from "@/api/ApiInstance"
  2. /** 管乐迷 */
  3. // 获取课程详情
  4. export const getCurrentCourseDetail_gym = (id: string) => {
  5. return httpAxios_gym.axioseRquest({
  6. method: "get",
  7. url: "/api-teacher/teacherCourseSchedule/getCurrentCourseDetail",
  8. params: {
  9. courseID: id
  10. }
  11. })
  12. }
  13. // 获取课件详情 详情展示用
  14. export const getLessonCourseDetail_gym = (id: string) => {
  15. return httpAxios_gym.axioseRquest({
  16. method: "get",
  17. url: "/api-teacher/lessonCourseware/getLessonCourseDetail/" + id
  18. })
  19. }
  20. //获取课程列表
  21. export const queryLessonCourseware_gym = () => {
  22. return httpAxios_gym.axioseRquest({
  23. method: "post",
  24. url: "/api-teacher/lessonCourseware/queryLessonCourseware",
  25. data: {
  26. page: 1,
  27. rows: 9999
  28. }
  29. })
  30. }
  31. // 课程详情列表
  32. export const getLessonCoursewareCourseList_gym = (id: string) => {
  33. return httpAxios_gym.axioseRquest({
  34. method: "get",
  35. url: "/api-teacher/lessonCourseware/getLessonCoursewareCourseList/" + id
  36. })
  37. }
  38. // 设置课件
  39. export const setCoursewareDetail_gym = (id: string, courseId: string) => {
  40. return httpAxios_gym.axioseRquest({
  41. method: "get",
  42. url: `/api-teacher/teacher/configCourseware`,
  43. params: {
  44. courseId,
  45. coursewareDetailId: id
  46. }
  47. })
  48. }
  49. // 获取当月所有的课程日期 month=2024-04
  50. export const getCourseScheduleDateByMonth_gym = (date: string, abortController: AbortController) => {
  51. return httpAxios_gym.axioseRquest({
  52. method: "get",
  53. signal: abortController.signal,
  54. url: `/api-teacher/teacherCourseSchedule/getCourseScheduleDateByMonth?month=${date}`
  55. })
  56. }
  57. // 获取当天的课程列表 date=2024-04-03
  58. export const getCourseSchedulesWithDate_gym = (date: string, abortController: AbortController) => {
  59. return httpAxios_gym.axioseRquest({
  60. method: "get",
  61. signal: abortController.signal,
  62. url: `/api-teacher/teacherCourseSchedule/getCourseSchedulesWithDate?date=${date}`
  63. })
  64. }
  65. /**
  66. * 管乐团
  67. */
  68. // 获取课程详情
  69. export const getCourseScheduleDetail_gyt = (id: string) => {
  70. return httpAxios_gyt.axioseRquest({
  71. method: "get",
  72. url: "/api-teacher/courseSchedule/detail/" + id
  73. })
  74. }
  75. // 获取课程能选择的课件列表
  76. export const getCourseware_gyt = (id: string) => {
  77. return httpAxios_gyt.axioseRquest({
  78. method: "post",
  79. url: "/api-teacher/courseSchedule/getCourseware/" + id
  80. })
  81. }
  82. // 获取课件详情 配置课件用
  83. export const getCoursewareDetail_gyt = (id: string, courseId: string) => {
  84. return httpAxios_gyt.axioseRquest({
  85. method: "post",
  86. url: `/api-teacher/courseSchedule/getCoursewareDetail?courseScheduleId=${courseId}&coursewareId=${id}`
  87. })
  88. }
  89. // 设置课件
  90. export const setCoursewareDetail_gyt = (id: string, courseId: string) => {
  91. return httpAxios_gyt.axioseRquest({
  92. method: "post",
  93. url: `/api-teacher/courseSchedule/setCoursewareDetail?courseScheduleId=${courseId}&coursewareDetailId=${id}`
  94. })
  95. }
  96. // 获取课件详情 详情展示用
  97. export const getLessonCoursewareDetail_gyt = (id: string) => {
  98. return httpAxios_gyt.axioseRquest({
  99. method: "get",
  100. url: "/api-teacher/lessonCoursewareDetail/detail/" + id
  101. })
  102. }
  103. // 获取当月所有的课程日期 month=2024-04
  104. export const getCourseScheduleDateByMonth_gyt = (date: string, abortController: AbortController) => {
  105. return httpAxios_gyt.axioseRquest({
  106. signal: abortController.signal,
  107. method: "post",
  108. url: `/api-teacher/courseSchedule/calendar`,
  109. data: {
  110. classMonth: date
  111. }
  112. })
  113. }
  114. // 获取当天的课程列表 date=2024-04-03
  115. export const getCourseSchedulesWithDate_gyt = (date: string, abortController: AbortController) => {
  116. return httpAxios_gyt.axioseRquest({
  117. signal: abortController.signal,
  118. method: "post",
  119. url: `/api-teacher/courseSchedule/page`,
  120. data: {
  121. classDate: date
  122. }
  123. })
  124. }