Commit 499127c7 authored by Damon's avatar Damon

fix: 【ID1001354】【小程序-题库-错题记录】:错题移出后总题数未减少,左侧的当前题目序号应不变

parent d555a303
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
}, },
methods: { methods: {
// 初始化数据 // 初始化数据
init() { init(i) {
const params = { const params = {
questionWarehouseId: this.questionWarehouseId, questionWarehouseId: this.questionWarehouseId,
recordId: this.recordId, recordId: this.recordId,
...@@ -302,7 +302,7 @@ export default { ...@@ -302,7 +302,7 @@ export default {
// 上次答到了第几题 // 上次答到了第几题
let index = this.source === 1 ? (this.lastIndex[this.questionWarehouseId] || 0) : 0 let index = this.source === 1 ? (this.lastIndex[this.questionWarehouseId] || 0) : 0
this.refresh(index) this.refresh(i ? i : index)
} }
}) })
}, },
...@@ -582,7 +582,7 @@ export default { ...@@ -582,7 +582,7 @@ export default {
remove() { remove() {
const info = this.list.find(v => v.index === this.currentIndex) const info = this.list.find(v => v.index === this.currentIndex)
this.$u.api.removeError({questionId: info.id}).then(res => { this.$u.api.removeError({questionId: info.id}).then(res => {
if(res) this.current = this.currentIndex + 1 if(res) this.init(this.currentIndex)
}) })
}, },
// 以下方法用于初始化数据 // 以下方法用于初始化数据
......
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