Commit ede5d1ba authored by Damon's avatar Damon

feat: 学习模式弹出提示

parent 507a9388
......@@ -378,11 +378,20 @@ export default {
changeModel(i) {
this.model = i
if (this.model === 2) {
this.showTip()
}
},
timeEnd() {
this.complete.timeout = true
this.handPapers()
},
showTip() {
if (!this.tipStatus) {
this.$u.vuex('tipStatus', true)
this.show = true
}
},
// 作答完毕
answerChange(status, lists, userAnswer) {
// 保存答题状态
......@@ -396,15 +405,14 @@ export default {
if(this.model === 1) this.saveAnswer(item)
// 滑动提示
if (!this.tipStatus && status === 'fail') {
this.$u.vuex('tipStatus', true)
this.show = true
if (status === 'fail') {
this.showTip()
}
// 顺序练习,更新答题卡
if (this.source === 1){
this.questionList[this.questionWarehouseId][this.currentIndex] = item
this.$u.vuex(`questionList.${this.questionWarehouseId}`, JSON.parse(JSON.stringify(this.questionList[this.questionWarehouseId])))
this.$u.vuex(`questionList.${this.questionWarehouseId}`, this.questionList[this.questionWarehouseId])
this.$u.vuex(`lastIndex.${this.questionWarehouseId}`, this.currentIndex)
// 统计是否达满所有试题
......@@ -516,7 +524,7 @@ export default {
info.collectionFlag = !status
if (this.source === 1) { //更新缓存数据
this.questionList[this.questionWarehouseId][this.currentIndex] = info
this.$u.vuex(`questionList.${this.questionWarehouseId}`, JSON.parse(JSON.stringify(this.questionList[this.questionWarehouseId])))
this.$u.vuex(`questionList.${this.questionWarehouseId}`, this.questionList[this.questionWarehouseId])
}
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment