From c9b04218ebd51d484ee4f662d24edc711ae7b7e6 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期三, 18 十二月 2024 17:50:00 +0800 Subject: [PATCH] 1 --- packageBookService/pages/psychologyAnswer/psychologyAnswer.js | 22 ++++++---------------- 1 files changed, 6 insertions(+), 16 deletions(-) diff --git a/packageBookService/pages/psychologyAnswer/psychologyAnswer.js b/packageBookService/pages/psychologyAnswer/psychologyAnswer.js index 0b381f3..a913ecf 100644 --- a/packageBookService/pages/psychologyAnswer/psychologyAnswer.js +++ b/packageBookService/pages/psychologyAnswer/psychologyAnswer.js @@ -282,21 +282,12 @@ }, // 鍒囨崲棰樼洰 changeSwiper(e) { - let index = e.detail.index - 1 >= 0 ? e.detail.index - 1 : 0; - const item = this.data.questionDataList[index]; - const lastItem = this.data.questionDataList[index + 1]; + let index = e.detail.index; + const lastItem = this.data.questionDataList[index]; this.setData({ currentIndex: e.detail.index, showId: lastItem.id }); - if ( - (this.data.answerType == "collectQuestion" || - this.data.answerType == "errorQuestion") && - !item.isComplete - ) { - let flag = this.isHaveAnswer(item.userAnswer); - if (flag) this.handleQuestion(index); - } }, // 鎴戠殑閿欓锛屾敹钘忔煡鐪嬭В鏋愭寜閽� viewParsing() { @@ -471,10 +462,6 @@ // 鍏堥亶鍘嗘墍鏈夐鐩紝灏嗘湭鎵规敼鐨勯鐩壒鏀� const qustionList = this.data.questionDataList; if (qustionList.length) this.handleQuestion(); - this.setData({ - isShowDialog: true, - submitStatus: true, - }) // 璁板綍鐢ㄦ埛绛旈鏁版嵁 let saveData = []; for (let index = 0; index < this.data.questionDataList.length; index++) { @@ -498,6 +485,10 @@ this.setData({ loading: false, showDialog: false, + }); + this.setData({ + isShowDialog: true, + submitStatus: true, }); }, // 鍒濆鍖栧嚱鏁� @@ -552,7 +543,6 @@ const questionList = this.data.questionDataList; const optionList = this.data.questionDataOptions; const scoreData = this.data.scoreDataList; - debugger for (let index = 0; index < questionList.length; index++) { const item = questionList[index]; if (item.questionType == 'judge' && item.userAnswer) { -- Gitblit v1.9.1