提交 18af015a authored 作者: lihuihui's avatar lihuihui

updata

上级 6b4b249a
...@@ -83,9 +83,9 @@ ...@@ -83,9 +83,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="st-btn" v-if="title === '随堂小测' || title === '模拟考试' || title === '知识点测试'"> <div :class="ratioNum == 100 ? 'st-btn cent' : 'st-btn'" v-if="title === '随堂小测' || title === '模拟考试' || title === '知识点测试'">
<div class="btn" @click="go(1)">全部解析</div> <div class="btn" @click="go(1)">全部解析</div>
<div class="btn" @click="go(-1)">错题解析</div> <div class="btn" @click="go(-1)" v-if="ratioNum !== 100">错题解析</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<script> <script>
import Exam from '../action' import Exam from '../action'
// import { Toast } from 'vant'
export default { export default {
name: 'ExamEnd', name: 'ExamEnd',
data() { data() {
...@@ -403,4 +404,7 @@ export default { ...@@ -403,4 +404,7 @@ export default {
margin-left: auto; margin-left: auto;
} }
} }
.cent{
justify-content: center;
}
</style> </style>
...@@ -213,7 +213,7 @@ export default { ...@@ -213,7 +213,7 @@ export default {
clearInterval(this.initTime) clearInterval(this.initTime)
this.initTime = setInterval(() => { this.initTime = setInterval(() => {
this.examSubmit(0) this.examSubmit(0)
}, 5000) }, 3000)
this.initData() this.initData()
} else { } else {
this.examEnd() this.examEnd()
...@@ -514,18 +514,7 @@ export default { ...@@ -514,18 +514,7 @@ export default {
} }
this.examEnd() this.examEnd()
this.scrollDom() this.scrollDom()
// if (res.sheet.remainingTime === undefined) {
// this.setClock(res.sheet.duration)
// } else {
// if (res.sheet.remainingTime > 0) {
// this.setClock(res.sheet.remainingTime)
// } else {
// this.examEnd()
// this.scrollDom()
// }
// }
} }
// clearTimeout(this.cache)
setTimeout(() => { setTimeout(() => {
this.examSubmit(0) this.examSubmit(0)
}, 1000) }, 1000)
...@@ -548,17 +537,23 @@ export default { ...@@ -548,17 +537,23 @@ export default {
}) })
}, },
errorQuestion(data) { errorQuestion(data) {
console.log(data.questions) let count = 0
let count = data.sheet.question_count const result = data.questions.map(item => {
data.questions.map((item) => { const scroeList = data.score_items[item.id]
item.question_list.map((dItem, index) => { const list = item.question_list.filter(subitem => {
if (data.score_items[item.id][dItem.id].is_right) { const score = scroeList[subitem.id]
item.question_list.splice(index, 1) return !score.is_right
count-- })
} item.question_list = list
return item
})
result.map(item => {
item.question_list.map(i => {
count++
}) })
}) })
data.sheet.question_count = count data.sheet.question_count = count
data.questions = result
this.questionsData = data this.questionsData = data
}, },
getSecond(time) { getSecond(time) {
......
...@@ -84,6 +84,14 @@ export default { ...@@ -84,6 +84,14 @@ export default {
}) })
} }
} }
},
metaInfo () {
return {
title: '已购课程',
meta: [
// { vmid: 'description', name: 'description', content: this.description }
]
}
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论