提交 baed51e9 authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修复课后作业点击开始考试为开始的问题

上级 e2ea4b12
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<h3>{{exam.title}}</h3> <h3>{{exam.title}}</h3>
</div> </div>
</div> </div>
<template v-if="status.isStart && exam.type !== 3"> <template v-if="status.isStart">
<div class="play-paper-content play-chapter-exam"> <div class="play-paper-content play-chapter-exam">
<template v-if="exam.id"> <template v-if="exam.id">
<div class="exam"> <div class="exam">
...@@ -314,6 +314,7 @@ export default { ...@@ -314,6 +314,7 @@ export default {
exam.id = data.id exam.id = data.id
exam.title = data.paper_title exam.title = data.paper_title
exam.score = {} exam.score = {}
exam.type = 3
exam.examination = data.examination.map(exam => { exam.examination = data.examination.map(exam => {
for (let i = 0; i < exam.radioList.length; i++) { for (let i = 0; i < exam.radioList.length; i++) {
exam.radioList[i].user_answer = '' exam.radioList[i].user_answer = ''
...@@ -363,7 +364,7 @@ export default { ...@@ -363,7 +364,7 @@ export default {
} }
this._time = setInterval(() => { this._time = setInterval(() => {
// this.loadExamStatus() // this.loadExamStatus()
if (!this.exam.type && this.status.isStart) { if (![1, 2].includes(this.exam.type) && this.status.isStart) {
// console.log(11, '暂存') // console.log(11, '暂存')
this.submitExam({ submitType: true }) // 暂存, submitType: true 暂存;其他或不填为提交 this.submitExam({ submitType: true }) // 暂存, submitType: true 暂存;其他或不填为提交
} }
...@@ -448,7 +449,7 @@ export default { ...@@ -448,7 +449,7 @@ export default {
'没有考试内容,认为是第一次答题,并且在答题期间,所以显示考试开始页面' '没有考试内容,认为是第一次答题,并且在答题期间,所以显示考试开始页面'
) )
} else { } else {
this.status.isStart = true this.status.isStart = _data.type !== 3
this.exam.title = _data.title this.exam.title = _data.title
this.exam.type = _data.type this.exam.type = _data.type
this.exam.score = _data.score this.exam.score = _data.score
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论