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 | 21 ++++++--------------- 1 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packageBookService/pages/psychologyAnswer/psychologyAnswer.js b/packageBookService/pages/psychologyAnswer/psychologyAnswer.js index ad07a50..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++) { @@ -499,6 +486,10 @@ loading: false, showDialog: false, }); + this.setData({ + isShowDialog: true, + submitStatus: true, + }); }, // 鍒濆鍖栧嚱鏁� async init(isReset) { -- Gitblit v1.9.1