From 4eaafc69d96ad39662e02314f0ea61b53c3b9659 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 16 十二月 2024 14:34:21 +0800 Subject: [PATCH] 教学互动答题完善 --- packageBookService/pages/bookServices/examination/questionOptions/index.js | 36 ++++++++++++++++++++++++------------ 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.js b/packageBookService/pages/bookServices/examination/questionOptions/index.js index 40919c9..f4c88f8 100644 --- a/packageBookService/pages/bookServices/examination/questionOptions/index.js +++ b/packageBookService/pages/bookServices/examination/questionOptions/index.js @@ -52,6 +52,12 @@ type: Boolean, value: false, }, + showId: { + type: String + }, + isShowDialog: { + type: Boolean + } }, /** @@ -69,13 +75,13 @@ }, observers: { countdownTime: function (newValue, oldValue) { - if (this.properties.answerType == "option") { + if (this.properties.answerType == "option" || this.properties.answerType == 'interaction') { this.setData({ useTime: this.formatTime( 2 * 60 * 60 * 1000 - this.properties.countdownTime ), }); - } else if (this.properties.answerType == "option") { + } else if (this.properties.answerType == "mock") { this.setData({ useTime: this.formatTime( this.properties.mockSumTime - this.properties.countdownTime @@ -85,11 +91,17 @@ if ( newValue == 0 && (this.properties.answerType == "option" || - this.properties.answerType == "mock") + this.properties.answerType == "mock") && !this.properties.submitStatus ) { this.timeout(); } }, + isShowDialog: function (newValue, oldValue) { + if (newValue) + this.setData({ + testReportState: newValue, + }); + } }, created() {}, @@ -172,7 +184,9 @@ onChangeSlider(e) { const value = e.detail.value; console.log(value); - this.triggerEvent("onChangeSlider", { value }); + this.triggerEvent("onChangeSlider", { + value + }); }, // 璁剧疆閬僵灞傜偣鍑� onSetUpChange(e) { @@ -186,12 +200,9 @@ radioItem: e.detail.value, }); const value = e.detail.value == "night" ? true : false; - wx.setNavigationBarColor({ - backgroundColor: "#222", - frontColor: "#222", + this.triggerEvent("changeBGColor", { + value }); - - this.triggerEvent("changeBGColor", { value }); }, // 閲嶅仛鎸夐挳 resterBtn() { @@ -244,10 +255,11 @@ this.properties.answerType == "errorQuestion" ) { this.submitPaper(); - return wx.navigateBack(); + // wx.navigateBack(); } else if ( this.properties.answerType == "option" || - this.properties.answerType == "mock" + this.properties.answerType == "mock" || + this.properties.answerType == "interaction" ) { if (this.properties.submitStatus) return wx.navigateBack(); this.properties.questionDataList.forEach((item) => { @@ -305,4 +317,4 @@ this.submitPaper(); }, }, -}); +}); \ No newline at end of file -- Gitblit v1.9.1