闫增涛
2024-04-02 aef06b129be7a3a12ac097db8e372b0cb33c6c42
packageBookService/pages/bookServices/examination/examination.js
@@ -1058,7 +1058,6 @@
          this.setData({
            collectList: JSON.parse(res[0].value)
          })
          // total.value = collectList.value.length
        } catch (error) {}
        if (this.data.collectList && this.data.collectList.length) {
          await this.getCollectDataList()
@@ -1087,12 +1086,6 @@
  // 获取收藏夹
  async getCollectDataList() {
    let questionArr = []
    // this.setData({
    //   cardList: [{
    //     catalogName: '收藏夹',
    //     infoList: []
    //   }]
    // })
    this.setData({
      cardList: [{
        catalogName: '单选题',
@@ -1116,13 +1109,15 @@
    let shortArr = [] // 简答
    let multipleChoiceArr = [] // 多选
    let completionArr = [] // 填空
    for (let qindex = 0; qindex < this.data.collectList.length; qindex++) {
      const qitem = this.data.collectList[qindex];
    let query = {
      path: '*',
      cmsPath: this.data.rootCmsItemId,
      cmsType: '*',
      productId: this.data.bookId,
      queryType: '*',
      itemIds: this.data.collectList.map((item) => item + ''),
        itemIds: qitem + '',
      itemFields: {
        Embedded_QuestionBank_Stem: [],
        Embedded_QuestionBank_AnalysisCon: [],
@@ -1135,7 +1130,7 @@
        Embedded_QuestionBank_Difficulty: []
      }
    }
    app.MG.store.getProductDetail(query).then((res) => {
      await app.MG.store.getProductDetail(query).then((res) => {
      let questionArr = []
      res.datas.cmsDatas[0].datas.forEach((item, index) => {
        const questionObj = {
@@ -1224,13 +1219,9 @@
          questionObj.type = '简答题'
          shortArr.push(questionObj)
        }
        // questionArr.push(questionObj)
      })
      // this.setData({
      //   questionDataList: questionArr,
      //   ['cardList[0].infoList']: questionArr,
      //   loading: false,
      // })
      })
    }
      this.setData({
        ['cardList[0].infoList']: singleChoiceArr,
        ['cardList[1].infoList']: judgeArr,
@@ -1251,7 +1242,6 @@
        questionDataList: questionArr,
        cardList: cardList,
        loading: false
      })
    })
  },
  // 我的错题模式下获取错题id列表