mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
修改考试的bug
This commit is contained in:
@@ -543,13 +543,15 @@ export default {
|
||||
let total=0;
|
||||
if(this.judge.length > 0){
|
||||
this.judge.forEach(item => {
|
||||
if(item.answer=='true' && item.userAnswer){
|
||||
//console.log(total,'判断',item);
|
||||
if(item.answer=='true' && item.userAnswer=='true'){
|
||||
total+=item.defaultScore;
|
||||
}else{
|
||||
if(item.answer=='false' && !item.userAnswer){
|
||||
if(item.answer=='false' && item.userAnswer=='false'){
|
||||
total+=item.defaultScore;
|
||||
}
|
||||
}
|
||||
//console.log(total,'分数');
|
||||
});
|
||||
}
|
||||
if(this.single.length > 0){
|
||||
@@ -588,6 +590,7 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log('实际得分:'+total)
|
||||
return total;
|
||||
},
|
||||
reStartTest(row){ //继续考试
|
||||
|
||||
Reference in New Issue
Block a user