From 9e5a84a4e41d7ab2cb820c7f77122f69a9d036dd Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期二, 26 三月 2024 20:15:09 +0800 Subject: [PATCH] 图书列表、详情代码修改 --- packageBookService/pages/bookServices/examination/examination.js | 35 +++++++++++++++++++++++++++-------- 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index e444433..7683e2a 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -41,7 +41,8 @@ answer: [] }, saveTime: 20, - isNight: false + isNight: false, + sliderValue: 0, // 瀛椾綋婊戝潡 }, /** @@ -169,7 +170,12 @@ } }); }, - + onChangeSlider(e) { + this.setData({ + sliderValue: e.detail.value + }) + console.log(e.detail.value); + }, // 杩斿洖 goBack() { console.log(this.data.submitStatus); @@ -356,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') { @@ -417,7 +425,9 @@ }) child.openTestReportDialog() } - + this.setData({ + loading: false + }) }, // 鍒濆鍖栧嚱鏁� async init() { @@ -429,17 +439,23 @@ }) 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鍒楄〃 } else if (this.data.answerType == 'collectQuestion') { + this.setData({ + submitStatus: true + }) // 鎴戠殑鏀惰棌 await this.getcollectId() // 鑾峰彇鏀惰棌棰樼洰 } else if (this.data.answerType == 'errorQuestion') { + this.setData({ + submitStatus: true + }) // 鎴戠殑閿欓 // loadings.value = true await this.getErrorIdList() @@ -456,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, @@ -776,6 +793,8 @@ }) }) } + // 鏈夐鐩啀寮�濮嬪�掕鏃� + if (this.data.questionDataList.length) this.startCountdown() this.setData({ loading: false }) -- Gitblit v1.9.1