提交 9641a585 authored 作者: 王鹏飞's avatar 王鹏飞
...@@ -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)
...@@ -541,7 +530,6 @@ export default { ...@@ -541,7 +530,6 @@ export default {
} }
this.requestData = res.answers this.requestData = res.answers
this.requestData2 = Object.keys(datas).length this.requestData2 = Object.keys(datas).length
console.log(this.requestData)
} else { } else {
this.requestData = {} this.requestData = {}
this.requestData2 = 0 this.requestData2 = 0
...@@ -549,16 +537,23 @@ export default { ...@@ -549,16 +537,23 @@ export default {
}) })
}, },
errorQuestion(data) { errorQuestion(data) {
let count = data.sheet.question_count let count = 0
data.questions.map((item) => { const result = data.questions.map(item => {
item.question_list.map((dItem, index) => { const scroeList = data.score_items[item.id]
if (data.score_items[item.id][dItem.id].is_right) { const list = item.question_list.filter(subitem => {
item.question_list.splice(index, 1) const score = scroeList[subitem.id]
count-- return !score.is_right
} })
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) {
......
...@@ -180,14 +180,23 @@ export default { ...@@ -180,14 +180,23 @@ export default {
}) })
}, },
goAbilityExam(n) { goAbilityExam(n) {
this.$router.push({ const path = `/exam/answer?type=1&is_create=${n}&tag_id=${this.detail.id}&papersUrl=zy/v2/examination/examination-papers`
path: '/exam/answer', if (this.isWeapp) {
query: { const src = encodeURIComponent(`${window.location.origin}${path}`)
type: 1, wx.miniProgram.navigateTo({
is_create: n, url: `/pages/web/index?src=${src}`
papersUrl: 'zy/v2/examination/examination-papers'
}
}) })
} else {
this.$router.push({ path })
}
// this.$router.push({
// path: '/exam/answer',
// query: {
// type: 1,
// is_create: n,
// papersUrl: 'zy/v2/examination/examination-papers'
// }
// })
}, },
startExam(event, id, cId, isCreate) { startExam(event, id, cId, isCreate) {
this.$router.push({ this.$router.push({
......
...@@ -68,6 +68,14 @@ export default { ...@@ -68,6 +68,14 @@ export default {
url: `/pages/pay/index?data=${data.product_id}` url: `/pages/pay/index?data=${data.product_id}`
}) })
} }
},
metaInfo () {
return {
title: '已购课程',
meta: [
// { vmid: 'description', name: 'description', content: this.description }
]
}
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论