| | |
| | | }, |
| | | // 提交逻辑 |
| | | 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') { |
| | |
| | | }) |
| | | child.openTestReportDialog() |
| | | } |
| | | |
| | | this.setData({ |
| | | loading: false |
| | | }) |
| | | }, |
| | | // 初始化函数 |
| | | async init() { |
| | |
| | | }) |
| | | 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列表 |
| | |
| | | } |
| | | 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, |
| | |
| | | }) |
| | | }) |
| | | } |
| | | // 有题目再开始倒计时 |
| | | if (this.data.questionDataList.length) this.startCountdown() |
| | | this.setData({ |
| | | loading: false |
| | | }) |