修改考试的bug

This commit is contained in:
daihh
2022-08-25 15:00:35 +08:00
parent c49eea8b40
commit a8668c42eb

View File

@@ -543,13 +543,15 @@ export default {
let total=0; let total=0;
if(this.judge.length > 0){ if(this.judge.length > 0){
this.judge.forEach(item => { this.judge.forEach(item => {
if(item.answer=='true' && item.userAnswer){ //console.log(total,'判断',item);
if(item.answer=='true' && item.userAnswer=='true'){
total+=item.defaultScore; total+=item.defaultScore;
}else{ }else{
if(item.answer=='false' && !item.userAnswer){ if(item.answer=='false' && item.userAnswer=='false'){
total+=item.defaultScore; total+=item.defaultScore;
} }
} }
//console.log(total,'分数');
}); });
} }
if(this.single.length > 0){ if(this.single.length > 0){
@@ -588,6 +590,7 @@ export default {
} }
}); });
} }
console.log('实际得分:'+total)
return total; return total;
}, },
reStartTest(row){ //继续考试 reStartTest(row){ //继续考试