因为pc端的一个考试问题,同步修改移动端

This commit is contained in:
daihh
2022-12-09 18:56:34 +08:00
parent f110360ab0
commit 9189b7e18f

View File

@@ -179,6 +179,7 @@
//console.log(this.paper.items);
let totalScore=0;
this.paper.items.forEach(item => {
item.score=parseInt(item.score);
totalScore+=item.score;//加到总分中
if(item.type != 102){
item.userAnswer='';
@@ -214,8 +215,14 @@
}
let allRight = true;
item.options.forEach(it =>{
if(it.answer && item.userAnswer.indexOf(it.id)==-1) {
allRight=false;
if(it.answer){ //正确答案
if(item.userAnswer.indexOf(it.id)==-1){
allRight=false;
}
}else{
if(item.userAnswer.indexOf(it.id)>-1){
allRight=false;
}
}
});
if(allRight){