闫增涛
2024-03-26 acb345cbe4a64de4ad9fb430b3047cf32eaf4ce4
packageBookService/pages/bookServices/examination/examination.js
@@ -362,10 +362,12 @@
  },
  // 提交逻辑
  submitPaper() {
    // 关闭退出页面监听
    wx.disableAlertBeforeUnload()
    this.setData({
      submitStatus: true
      submitStatus: true,
      loading: true
    })
    const child = this.selectComponent('#question-options')
    if (this.data.answerType == 'option' || this.data.answerType == 'errorQuestion' || this.data.answerType == 'mock') {
@@ -423,7 +425,9 @@
      })
      child.openTestReportDialog()
    }
    this.setData({
      loading: false
    })
  },
  // 初始化函数
  async init() {
@@ -435,10 +439,10 @@
    })
    if (this.data.answerType == 'option') {
      if (this.data)
        this.startCountdown()
      this.setData({
        countdownTime: 2 * 60 * 60 * 1000
      })
        // this.startCountdown()
        this.setData({
          countdownTime: 2 * 60 * 60 * 1000
        })
      // 测试答题
      await this.getCollectIdList() // 获取收藏id列表
      await this.getErrorList()   // 获取错题id列表
@@ -468,6 +472,7 @@
        }
        if (mocklist.length && this.data.uuid) {
          const oldMockData = mocklist.find((mockItem) => mockItem.id == this.data.uuid)
          debugger
          this.setData({
            'mockData.state': oldMockData.state,
            'mockData.score': oldMockData.score,
@@ -788,6 +793,8 @@
        })
      })
    }
    // 有题目再开始倒计时
    if (this.data.questionDataList.length) this.startCountdown()
    this.setData({
      loading: false
    })