提交 9641a585 authored 作者: 王鹏飞's avatar 王鹏飞
......@@ -83,9 +83,9 @@
</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)" v-if="ratioNum !== 100">错题解析</div>
</div>
</div>
</div>
......@@ -94,6 +94,7 @@
<script>
import Exam from '../action'
// import { Toast } from 'vant'
export default {
name: 'ExamEnd',
data() {
......@@ -403,4 +404,7 @@ export default {
margin-left: auto;
}
}
.cent{
justify-content: center;
}
</style>
......@@ -213,7 +213,7 @@ export default {
clearInterval(this.initTime)
this.initTime = setInterval(() => {
this.examSubmit(0)
}, 5000)
}, 3000)
this.initData()
} else {
this.examEnd()
......@@ -514,18 +514,7 @@ export default {
}
this.examEnd()
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(() => {
this.examSubmit(0)
}, 1000)
......@@ -541,7 +530,6 @@ export default {
}
this.requestData = res.answers
this.requestData2 = Object.keys(datas).length
console.log(this.requestData)
} else {
this.requestData = {}
this.requestData2 = 0
......@@ -549,16 +537,23 @@ export default {
})
},
errorQuestion(data) {
let count = data.sheet.question_count
data.questions.map((item) => {
item.question_list.map((dItem, index) => {
if (data.score_items[item.id][dItem.id].is_right) {
item.question_list.splice(index, 1)
count--
}
let count = 0
const result = data.questions.map(item => {
const scroeList = data.score_items[item.id]
const list = item.question_list.filter(subitem => {
const score = scroeList[subitem.id]
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.questions = result
this.questionsData = data
},
getSecond(time) {
......
......@@ -180,14 +180,23 @@ export default {
})
},
goAbilityExam(n) {
this.$router.push({
path: '/exam/answer',
query: {
type: 1,
is_create: n,
papersUrl: 'zy/v2/examination/examination-papers'
}
const path = `/exam/answer?type=1&is_create=${n}&tag_id=${this.detail.id}&papersUrl=zy/v2/examination/examination-papers`
if (this.isWeapp) {
const src = encodeURIComponent(`${window.location.origin}${path}`)
wx.miniProgram.navigateTo({
url: `/pages/web/index?src=${src}`
})
} 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) {
this.$router.push({
......
......@@ -68,6 +68,14 @@ export default {
url: `/pages/pay/index?data=${data.product_id}`
})
}
},
metaInfo () {
return {
title: '已购课程',
meta: [
// { vmid: 'description', name: 'description', content: this.description }
]
}
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论