course.js 829 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import BaseStore from '@src/stores/base';
  2. export default class CourseStore extends BaseStore {
  3. /**
  4. * 所有vs课程
  5. */
  6. allVs() {
  7. return this.apiGet('/course/vs');
  8. }
  9. listVideo(params) {
  10. return this.apiGet('/course/video/list', params);
  11. }
  12. simple(courseId) {
  13. return this.apiGet('/course/simple', { courseId });
  14. }
  15. get(courseId) {
  16. return this.apiGet('/course/detail', { courseId });
  17. }
  18. listPackage(params) {
  19. return this.apiGet('/course/package/list', params);
  20. }
  21. getPackage(packageId) {
  22. return this.apiGet('/course/package/detail', { packageId });
  23. }
  24. listData(params) {
  25. return this.apiGet('/course/data/list', params);
  26. }
  27. getData(dataId) {
  28. return this.apiGet('/course/data/detail', { dataId });
  29. }
  30. }
  31. export const Course = new CourseStore({ key: 'course' });