Pārlūkot izejas kodu

fix:考试错误时的判断

xuqiaoying 3 gadi atpakaļ
vecāks
revīzija
c0086bbdd7
1 mainītis faili ar 11 papildinājumiem un 8 dzēšanām
  1. 11 8
      src/pages/bank-exam/index.vue

+ 11 - 8
src/pages/bank-exam/index.vue

@@ -1679,14 +1679,17 @@ export default {
       this.$set(this.questionList[questionIndex], "ques", arr);
       this.isDoOver();
 
-      let isWrong = this.questionList[questionIndex].ques.some(
-        (quesItem, quesIndex) => {
-          return (
-            this.questionList[questionIndex].ques[quesIndex] !=
-            this.questionList[questionIndex].ans[quesIndex]
-          );
-        }
-      );
+      // let isWrong = this.questionList[questionIndex].ques.some(
+      //   (quesItem, quesIndex) => {
+      //     return (
+      //       this.questionList[questionIndex].ques[quesIndex] !=
+      //       this.questionList[questionIndex].ans[quesIndex]
+      //     );
+      //   }
+      // );
+      let isWrong = this.questionList[questionIndex].ques.some((item, i) => {
+        return this.questionList[questionIndex].ans.indexOf(item) == -1;
+      })
       // 回答错误
       if (isWrong) {
         this.$request