From 7a382c7bc483ea0103a0172312f12409e67dbcde Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 12 Dec 2022 11:19:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=80=83=E8=AF=95=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E8=AE=A1=E7=AE=97=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/study/exam.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/study/exam.vue b/pages/study/exam.vue index 19f5f8d..7312f52 100644 --- a/pages/study/exam.vue +++ b/pages/study/exam.vue @@ -214,8 +214,14 @@ } let allRight = true; item.options.forEach(it =>{ - if(it.answer && item.userAnswer.indexOf(it.id)==-1) { + if(it.answer){ //正确答案 + if(item.userAnswer.indexOf(it.id)==-1){ allRight=false; + } + }else{ + if(item.userAnswer.indexOf(it.id)>-1){ + allRight=false; + } } }); if(allRight){