mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 00:06:45 +08:00
SZX-1335在线课考试显示不正常。
This commit is contained in:
@@ -132,6 +132,7 @@ import apiCourse from '@/api/modules/course.js';
|
||||
import apiExamPaper from '@/api/modules/paper.js';
|
||||
import {formatDate,formatSeconds} from '@/utils/datetime.js';
|
||||
import {testType,correctJudgment,numberToLetter} from '@/utils/tools.js';
|
||||
import { safeJsonParse } from '@/utils/index.js';
|
||||
export default {
|
||||
props:{
|
||||
studyId: {
|
||||
@@ -216,8 +217,12 @@ export default {
|
||||
apiCourse.getExam(this.content.id).then(res=>{
|
||||
if(res.status==200){
|
||||
this.info=res.result;
|
||||
if(this.showTest) {
|
||||
let paper= JSON.parse(this.info.paperContent);
|
||||
if(this.showTest) {
|
||||
let paper = safeJsonParse(this.info.paperContent, { items: [] });
|
||||
if(!paper.items || paper.items.length === 0){
|
||||
this.viewTest = [];
|
||||
return;
|
||||
}
|
||||
paper.items.forEach(item=>{
|
||||
//console.log(item);
|
||||
if(item.type==101){
|
||||
|
||||
Reference in New Issue
Block a user