|
@@ -88,11 +88,10 @@
|
|
|
答案解析
|
|
|
</button>
|
|
|
<button
|
|
|
- v-if="remainingQuestionNumber"
|
|
|
class="next"
|
|
|
@click="onClickNext"
|
|
|
>
|
|
|
- 下一题({{ remainingQuestionNumber }})
|
|
|
+ {{ remainingQuestionNumber ? `下一题${remainingQuestionNumber}` : `完成答题` }}
|
|
|
</button>
|
|
|
</div>
|
|
|
<div
|
|
@@ -100,11 +99,10 @@
|
|
|
class="button-wrapper-wrong"
|
|
|
>
|
|
|
<button
|
|
|
- v-if="remainingQuestionNumber"
|
|
|
class="next"
|
|
|
@click="onClickNext"
|
|
|
>
|
|
|
- 下一题({{ remainingQuestionNumber }})
|
|
|
+ {{ remainingQuestionNumber ? `下一题${remainingQuestionNumber}` : `完成答题` }}
|
|
|
</button>
|
|
|
<button
|
|
|
class="retry"
|
|
@@ -200,17 +198,22 @@ export default {
|
|
|
this.$refs['question-inner'].resetSelectedIdxList()
|
|
|
},
|
|
|
onClickNext() {
|
|
|
- this.setIsSubmitted(false)
|
|
|
- this.setAnswerRecord(null)
|
|
|
- this.isShowDesc = false
|
|
|
+ if (this.remainingQuestionNumber) {
|
|
|
|
|
|
- const newId = globalUtils.getNextQuestionId(this.questionInfo.id)
|
|
|
- const quizInfo = quizData.find((item) => {
|
|
|
- return item.id === newId
|
|
|
- })
|
|
|
- this.setQuestionInfo(quizInfo)
|
|
|
+ this.setIsSubmitted(false)
|
|
|
+ this.setAnswerRecord(null)
|
|
|
+ this.isShowDesc = false
|
|
|
|
|
|
- this.$refs['question-inner'].resetSelectedIdxList()
|
|
|
+ const newId = globalUtils.getNextQuestionId(this.questionInfo.id)
|
|
|
+ const quizInfo = quizData.find((item) => {
|
|
|
+ return item.id === newId
|
|
|
+ })
|
|
|
+ this.setQuestionInfo(quizInfo)
|
|
|
+
|
|
|
+ this.$refs['question-inner'].resetSelectedIdxList()
|
|
|
+ } else {
|
|
|
+ this.onClickClose()
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
}
|