From cf1fcff430fa1331c1d9b2b844fa9ad710fb7a26 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期二, 16 四月 2024 11:30:34 +0800 Subject: [PATCH] 详情页,答题器bug修改 --- packageBookService/pages/bookServices/examination/examination.js | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index a819f70..ceac28b 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -47,7 +47,7 @@ sliderValue: 0, // 瀛椾綋婊戝潡 startTime: "", //杩涘叆椤甸潰褰撳墠鏃堕棿 pauseTime: 0, //鏆傚仠鏃堕棿 - + showDialog: false // 鏈彁浜ら��鍑烘嫤鎴脊绐� }, /** @@ -68,6 +68,9 @@ idPathList: options.idPathList ? JSON.parse(options.idPathList) : [], answerType: options.answerType, }); + // wx.setNavigationBarTitle({ + // title: options.answerTitle, + // }) if (this.data.answerType == "mock") { this.setData({ uuid: options.uuid, @@ -238,10 +241,15 @@ confirmColor: "#ff6c00", cancelColor: "#949494", complete: (res) => { - if (res.cancel) {} + if (res.cancel) { + this.setData({ + showDialog: true + }) + } if (res.confirm) { this.setData({ submitStatus: true, + showDialog: false }); wx.navigateBack(); } @@ -488,6 +496,7 @@ // 鎻愪氦閫昏緫 submitPaper() { this.setData({ + showDialog: false, submitStatus: true, loading: true, }); @@ -566,7 +575,6 @@ }); if (this.data.answerType == "option") { if (this.data) - // this.startCountdown() this.setData({ countdownTime: 2 * 60 * 60 * 1000, }); @@ -630,6 +638,9 @@ oldMockData.state == "2" ) { this.startCountdown(); + this.setData({ + showDialog: true + }) } if (oldMockData.state == "3") { this.setData({ @@ -729,6 +740,9 @@ await this.getQuestionList(value.dataList); } else { await this.getQuestionList(); // 鑾峰彇棰樺簱棰樼洰 + this.setData({ + showDialog: true + }) } }); } @@ -984,7 +998,7 @@ } // 鏈夐鐩啀寮�濮嬪�掕鏃� if (this.data.questionDataList.length) { - // console.log(this.data.questionDataList); + console.log(this.data.questionDataList); this.startCountdown(); } else { this.setData({ @@ -2057,11 +2071,12 @@ }) .then((res) => { if (res[0]) { + // 杩欓噷鐨� countdownTime 璧嬪�硷細濡傛灉鏄椂闂村埌浜嗘彁浜わ紝璁板綍鐨勫墿浣欐椂闂村氨鏄�0锛屾墍浠ワ細濡傛灉鏄�0鐨勮瘽璧嬪��1绉掞紝闃叉鐩戝惉鍒版椂闂翠负0鍐嶆鎻愪氦 this.setData({ currentIndex: JSON.parse(res[0].value).currentIndex, "mockData.time": JSON.parse(res[0].value).time, - countdownTime: JSON.parse(res[0].value).time ? - JSON.parse(res[0].value).time : this.data.mockData.sumTime, + countdownTime: JSON.parse(res[0].value).time > 0 ? + JSON.parse(res[0].value).time : 1000, "mockData.answer": JSON.parse(res[0].value).answerData, }); console.log(JSON.parse(res[0].value)); -- Gitblit v1.9.1