litian
2024-09-12 bbba5d26e9e26c910ed337dcb65f462752ee6dce
packageBookService/pages/bookServices/examination/examination.js
@@ -53,7 +53,8 @@
    startTime: "", //进入页面当前时间
    pauseTime: 0, //暂停时间
    showDialog: false, // 未提交退出拦截弹窗
    showId: ''
    showId: '',
    isShowDialog: false, // 测试报告弹窗是否显示
  },
  /**
@@ -202,6 +203,7 @@
   * 用户点击右上角分享
   */
  onShareAppMessage() {},
  onShareTimeline() {},
  // 监听watch
  watch(context, variableName, callback) {
@@ -549,7 +551,8 @@
      submitStatus: true,
      loading: true,
    });
    const child = this.selectComponent("#question-options");
    const child = this.selectComponent('#question-options');
    if (
      this.data.answerType == "option" ||
      this.data.answerType == "errorQuestion" ||
@@ -565,7 +568,11 @@
    if (this.data.answerType == "option") {
      this.toggleCountdown();
      this.recordAnswerData();
      child.openTestReportDialog();
      // this.selectComponent 拿不到 组件了, 改为监听组件传值 打开弹窗
      // child.openTestReportDialog();
      this.setData({
        isShowDialog: true
      })
    } else if (
      this.data.answerType == "collectQuestion" ||
      this.data.answerType == "errorQuestion"
@@ -608,7 +615,10 @@
          }),
        }, ],
      });
      child.openTestReportDialog();
      // child.openTestReportDialog();
      this.setData({
        isShowDialog: true
      })
    }
    this.setData({
      loading: false,
@@ -1112,7 +1122,7 @@
      // 简答 翻译
      questionList[index].isRight = null;
    } else if (item.questionType == "completion") {
      if (item.answer == "string") {
      if (typeof item.answer == "string") {
        item.isRight = item.answer == item.userAnswer[0];
      } else {
        if (item.answer.length != item.userAnswer.length) {