Commit ede5d1ba authored by Damon's avatar Damon

feat: 学习模式弹出提示

parent 507a9388
...@@ -378,11 +378,20 @@ export default { ...@@ -378,11 +378,20 @@ export default {
changeModel(i) { changeModel(i) {
this.model = i this.model = i
if (this.model === 2) {
this.showTip()
}
}, },
timeEnd() { timeEnd() {
this.complete.timeout = true this.complete.timeout = true
this.handPapers() this.handPapers()
}, },
showTip() {
if (!this.tipStatus) {
this.$u.vuex('tipStatus', true)
this.show = true
}
},
// 作答完毕 // 作答完毕
answerChange(status, lists, userAnswer) { answerChange(status, lists, userAnswer) {
// 保存答题状态 // 保存答题状态
...@@ -396,15 +405,14 @@ export default { ...@@ -396,15 +405,14 @@ export default {
if(this.model === 1) this.saveAnswer(item) if(this.model === 1) this.saveAnswer(item)
// 滑动提示 // 滑动提示
if (!this.tipStatus && status === 'fail') { if (status === 'fail') {
this.$u.vuex('tipStatus', true) this.showTip()
this.show = true
} }
// 顺序练习,更新答题卡 // 顺序练习,更新答题卡
if (this.source === 1){ if (this.source === 1){
this.questionList[this.questionWarehouseId][this.currentIndex] = item 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) this.$u.vuex(`lastIndex.${this.questionWarehouseId}`, this.currentIndex)
// 统计是否达满所有试题 // 统计是否达满所有试题
...@@ -516,7 +524,7 @@ export default { ...@@ -516,7 +524,7 @@ export default {
info.collectionFlag = !status info.collectionFlag = !status
if (this.source === 1) { //更新缓存数据 if (this.source === 1) { //更新缓存数据
this.questionList[this.questionWarehouseId][this.currentIndex] = info 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