course.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import { createPost } from "@/utils/api";
  2. /**
  3. * 导学课程信息获取
  4. *
  5. * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48071)
  6. */
  7. export const getGuideInf = createPost("/media/rcusercourse/guide/lesson/get");
  8. export type GuideInfData = Awaited<ReturnType<typeof getGuideInf>>;
  9. /**
  10. * 录播课用户课程列表
  11. *
  12. * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48116)
  13. */
  14. export const getCourseList = createPost("/media/rcusercourse/user/course/list");
  15. export type CourseList = Awaited<
  16. ReturnType<typeof getCourseList>
  17. >["ent"]["items"];
  18. export type TeacherInfo = Awaited<
  19. ReturnType<typeof getCourseList>
  20. >["ent"]["teacherinfo"];
  21. /**
  22. * 录播课用户课节列表
  23. *
  24. * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48089)
  25. */
  26. export const getLessonList = createPost("/media/rcusercourse/user/lesson/list");
  27. export type LessonListData = Awaited<ReturnType<typeof getLessonList>>["ent"];
  28. /**
  29. * 录播课用户课节获取
  30. *
  31. * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48098)
  32. */
  33. export const getLessonDetail = createPost(
  34. "/media/rcusercourse/user/lesson/detail"
  35. );
  36. export type UnitContent = ParsedUnitContent;
  37. /**
  38. * 录播课用户课节状态设置
  39. *
  40. * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48107)
  41. */
  42. export const setModuleStatus = createPost(
  43. "/media/rcusercourse/user/lesson/status/set"
  44. );
  45. /**
  46. * 录播课用户主观作业信息
  47. *
  48. * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48530)
  49. */
  50. export const getSubjectiveHomeworks = createPost(
  51. "/media/rchomework/user/subwork/list"
  52. );