12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import BaseStore from '@src/stores/base';
- export default class TextbookStore extends BaseStore {
- /**
- * 所有机经信息
- */
- getInfo() {
- return this.apiGet('/textbook/info');
- }
- /**
- * 获取机经进度
- */
- progress() {
- return this.apiGet('/textbook/progress');
- }
- /**
- * 机经组卷列表
- */
- listPaper({ page, size, latest, logic, finish }) {
- return this.apiGet('/textbook/paper/list', { page, size, latest: !!latest, logic, times: finish });
- }
- listYear(year) {
- return this.apiGet('/textbook/year', { year });
- }
- allHistory(subject) {
- return this.apiGet('/textbook/history/all', { subject });
- }
- noTopic(libraryId, subject, no) {
- return this.apiGet('/textbook/topic/no', { libraryId, subject, no });
- }
- listTopic({ page, size, latest, subject, keyword, quality, isOld, order, direction }) {
- return this.apiGet('/textbook/topic/list', { page, size, latest, subject, keyword, quality, isOld, order, direction });
- }
- subscribe(subscribe) {
- return this.apiPost('/textbook/subscribe', { subscribe });
- }
- enroll(date) {
- return this.apiPost('/textbook/enroll', { date });
- }
- unEnroll() {
- return this.apiPost('/textbook/enroll/cancel');
- }
- listEnroll(startDate, endDate) {
- return this.apiGet('/textbook/enroll/list', { startDate, endDate });
- }
- }
- export const Textbook = new TextbookStore({ key: 'textbook' });
|