From 1f33c401da7a7a7b67222af7400dba66d65b6a9a Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期四, 20 六月 2024 10:44:08 +0800 Subject: [PATCH] feat:音频题解析 --- src/views/grade/components/answer-main/answer-single/index.vue | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/views/grade/components/answer-main/answer-single/index.vue b/src/views/grade/components/answer-main/answer-single/index.vue index 8da3bf0..c6a3fc3 100644 --- a/src/views/grade/components/answer-main/answer-single/index.vue +++ b/src/views/grade/components/answer-main/answer-single/index.vue @@ -38,16 +38,16 @@ import { computed, ref } from 'vue'; import { storeToRefs } from 'pinia'; import ExamInfo from '@/components/ExamInfo/index.vue'; -import { useExamStore } from '@/store/index.js'; -const examStore = useExamStore(); +import { useGradeStore } from '@/store/index.js'; +const gradeStore = useGradeStore(); -const { currentIndex } = storeToRefs(examStore); +const { currentIndex } = storeToRefs(gradeStore); -const activeQuestion = ref(examStore.getActiveQuestion); +const activeQuestion = ref(gradeStore.getActiveQuestion); const answerState = (item) => { if (item.prefix === activeQuestion.value.correct) { - const flag = checkRight(activeQuestion.value.correct, activeQuestion.value.right); + const flag = activeQuestion.value.correct === activeQuestion.value.right; return { right: flag, wrong: !flag @@ -60,9 +60,6 @@ } }; -const checkRight = (currentAnswer, rightAnswer) => { - return currentAnswer === rightAnswer; -}; const analysisState = computed(() => { return { -- Gitblit v1.8.0