|
@@ -107,11 +107,30 @@ export default {
|
|
this.papers = data.data;
|
|
this.papers = data.data;
|
|
this.paperMap[this.curLevel] = data.data;
|
|
this.paperMap[this.curLevel] = data.data;
|
|
},
|
|
},
|
|
- prevLevel() {
|
|
|
|
|
|
+ async updateLevelPapers(level) {
|
|
|
|
+ const datas = {
|
|
|
|
+ questionId: this.questionId,
|
|
|
|
+ level: this.curLevel,
|
|
|
|
+ sort: "secretNumber",
|
|
|
|
+ isSample: true,
|
|
|
|
+ page: 0,
|
|
|
|
+ size: 100
|
|
|
|
+ };
|
|
|
|
+ const data = await paperList(datas).catch(() => {});
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ if (!data) return;
|
|
|
|
+ this.paperMap[this.curLevel] = data.data;
|
|
|
|
+ if (this.curLevel === level) {
|
|
|
|
+ this.papers = data.data;
|
|
|
|
+ this.$refs.PaperCarousel.updateIndex();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async prevLevel() {
|
|
if (this.isFirstLevel) return;
|
|
if (this.isFirstLevel) return;
|
|
this.curLevelIndex--;
|
|
this.curLevelIndex--;
|
|
this.setCurLevel(this.curLevelIndex);
|
|
this.setCurLevel(this.curLevelIndex);
|
|
- this.updatePapers();
|
|
|
|
|
|
+ await this.getPapers();
|
|
|
|
+ this.$refs.PaperCarousel.setCurPaper(this.papers.length - 1);
|
|
},
|
|
},
|
|
nextLevel() {
|
|
nextLevel() {
|
|
if (this.isLastLevel) return;
|
|
if (this.isLastLevel) return;
|