textbook.js 613 B

123456789101112131415161718192021222324
  1. import BaseStore from '@src/stores/base';
  2. export default class TextbookStore extends BaseStore {
  3. /**
  4. * 所有机经信息
  5. */
  6. getInfo() {
  7. return this.apiGet('/textbook/info');
  8. }
  9. listYear(year) {
  10. return this.apiGet('/textbook/year', { year });
  11. }
  12. allHistory(subject) {
  13. return this.apiGet('/textbook/history/all', { subject });
  14. }
  15. listTopic({ page, size, latest, qualitys, isOld, order, direction }) {
  16. return this.apiGet('/textbook/topic/list', { page, size, latest, qualitys, isOld, order, direction });
  17. }
  18. }
  19. export const Textbook = new TextbookStore({ key: 'textbook' });