import BaseStore from '@src/stores/base'; export default class SentenceStore extends BaseStore { /** * 所有长难句信息 */ getInfo() { return this.apiGet('/sentence/info'); } /** * 激活长难句 * @param {*} code */ active(code) { return this.apiPut('/sentence/active', { code }); } /** * 文章列表 * @param {*} chapter */ listArticle() { return this.apiGet('/sentence/article/list'); } /** * 获取文章详情 * @param {*} articleId */ detailArticle(articleId) { return this.apiGet('/sentence/article/detail', { articleId }); } /** * 更新长难句文章进度 * @param {*} chapter * @param {*} part * @param {*} process * @param {*} time * @param {*} currentChapter * @param {*} currentPart */ updateProcess(chapter, part, process, time, currentChapter, currentPart) { return this.apiPut('/sentence/article/process', { chapter, part, process, time, currentChapter, currentPart }); } } export const Sentence = new SentenceStore({ key: 'sentence' });