zhongshujie
2024-12-05 b00acb907054a7119862de9c037e600b3818e266
packageBookService/pages/bookServices/examination/examination.js
@@ -53,7 +53,8 @@
    startTime: "", //进入页面当前时间
    pauseTime: 0, //暂停时间
    showDialog: false, // 未提交退出拦截弹窗
    showId: ''
    showId: '',
    isShowDialog: false, // 测试报告弹窗是否显示
  },
  /**
@@ -76,6 +77,7 @@
      storeInfo: options.storeInfo,
      jslx: options.jslx,
    });
    console.log(options, 'options');
    wx.setNavigationBarTitle({
      title: options.answerTitle,
    })
@@ -85,7 +87,9 @@
        mockid: options.mockid,
      });
    }
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
@@ -94,6 +98,8 @@
          this.init();
        }
      })
    } else {
      this.init()
    }
  },
@@ -198,6 +204,7 @@
   * 用户点击右上角分享
   */
  onShareAppMessage() {},
  onShareTimeline() {},
  // 监听watch
  watch(context, variableName, callback) {
@@ -545,7 +552,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" ||
@@ -561,7 +569,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"
@@ -604,7 +616,10 @@
          }),
        }, ],
      });
      child.openTestReportDialog();
      // child.openTestReportDialog();
      this.setData({
        isShowDialog: true
      })
    }
    this.setData({
      loading: false,
@@ -827,6 +842,7 @@
        catalogName: pathitem.name,
        infoList: [],
      });
      console.log(pathList, "pathList");
      this.setData({
        cardList: pathList,
      });
@@ -1108,7 +1124,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) {
@@ -1806,6 +1822,7 @@
        cardList: cardList,
        loading: false,
      });
      console.log(this.data.questionDataList, "questionDataList");
    });
  },
  // 获取组卷结果