main.js 675 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import BaseStore from '@src/stores/base';
  2. export default class MainStore extends BaseStore {
  3. /**
  4. * 获取首页配置
  5. */
  6. getIndex() {
  7. return this.apiGet('/base/index');
  8. }
  9. /**
  10. * 获取广告列表
  11. */
  12. getAd() {
  13. return this.apiGet('/base/ad');
  14. }
  15. /**
  16. * 获取考分排行信息
  17. */
  18. getScore(total, quant) {
  19. return this.apiGet('/base/score', { total, quant });
  20. }
  21. /**
  22. * 所有练习层级
  23. */
  24. getExercise() {
  25. return this.apiGet('/exercise/struct');
  26. }
  27. /**
  28. * 所有模考层级
  29. */
  30. getExamination() {
  31. return this.apiGet('/examination/struct');
  32. }
  33. }
  34. export const Main = new MainStore({ key: 'main' });