zhongshujie
2024-12-18 ce062b3ff6d8e3db929820d004972df893882d4e
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) {