移动端考试未随机修改

This commit is contained in:
670788339
2025-07-16 14:22:19 +08:00
parent 2abda0e9a9
commit 6066633f42
5 changed files with 13 additions and 7 deletions

View File

@@ -83,6 +83,10 @@
scoreShow:false,
lastScore:0,
timerValue:0,
examPaper:{
json:{},//试题的json格式
items:[],//试题内容
},
noAnswers:[] //有未答完的试题
}
},
@@ -117,10 +121,12 @@
// apiExamPaper.getPaperContent(this.info.paperId).then(rs=>{
apiExamPaper.getPcPaperContent(this.info.id).then(rs=>{
if(rs.status==200){
//console.log(rs.result)
let paperItems=JSON.parse(rs.result);
//console.log(this.examPaper.json,'this.examPaper.json');
let qitems=this.convertToItems(paperItems);
//console.log(rs.result)// 判断 result 是否是字符串,如果是才 parse
// let paperItems=JSON.parse(rs.result);
this.examPaper.json=rs.result;
console.log(this.examPaper.json,'this.examPaper.json');
let qitems=this.convertToItems(this.examPaper.json);
this.paper ={items:qitems};
this.total=qitems.length;
this.curItem=qitems[this.curIndex];