ZhangXianQiang
2024-06-28 6a4c9ac686d0a0d3ead45e16e8a4481b7c6406f2
src/store/modules/exam.js
@@ -43,7 +43,6 @@
    };
  });
  const setExamInfo = (info) => {
    examInfo.value = info;
  };
@@ -55,9 +54,16 @@
  const setQuestionAnswer = (type, index, answer) => {
    const temp = examDetail.value.find(item => item.questionType === type);
    if (temp) {
      temp.questionList[index].correct = answer;
      temp.questionList[index].answer = answer;
    }
  };
  const setQuestionAnswerList = (type, index, answer) => {
    const temp = examDetail.value.find(item => item.questionType === type);
    if (temp) {
      temp.questionList[index].answerList = answer;
    }
  }
  const setProgress = (progress) => {
    answerProgress.value = progress;
@@ -87,6 +93,7 @@
    setExamInfo,
    setExamDetail,
    setQuestionAnswer,
    setQuestionAnswerList,
    setProgress
  };
});