|
@@ -88,13 +88,15 @@ export const useSubjectCheck = (currentSubject: ComputedRef<any>, nextSubject: (
|
|
|
status += 2;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return { opt: val, status };
|
|
|
});
|
|
|
- isAllTrue?trueNum.value++:falseNum.value++;
|
|
|
-
|
|
|
+ //正确已经在别处处理了
|
|
|
|
|
|
- if (JSON.stringify(currentSubject.value.answer) == JSON.stringify(currentSubject.value.userAnswer)) {
|
|
|
+ let answers = currentSubject.value.answer.split("-")
|
|
|
+ // console.log(JSON.stringify(currentSubject.value.answer.split("-")),JSON.stringify(currentSubject.value.userAnswer))
|
|
|
+ //统一使用数组进行检查,单项时候currentSubject.value.userAnswer为string,需转化为数组进行比对
|
|
|
+ if (JSON.stringify(answers.sort()) == JSON.stringify(typeof currentSubject.value.userAnswer === 'string' ? [currentSubject.value.userAnswer] : currentSubject.value.userAnswer.sort())) {
|
|
|
//答案正确
|
|
|
//类型是错误时候不显示对错
|
|
|
_type == "localWrong" ? currentSubject.value.isTrue = null : currentSubject.value.isTrue = true
|
|
@@ -105,6 +107,8 @@ export const useSubjectCheck = (currentSubject: ComputedRef<any>, nextSubject: (
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
+
|
|
|
+ falseNum.value++;
|
|
|
//答案错误
|
|
|
wrongModel.adds([
|
|
|
{
|
|
@@ -121,7 +125,7 @@ export const useSubjectCheck = (currentSubject: ComputedRef<any>, nextSubject: (
|
|
|
skillsShow.value = true;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
|