111
QYF-GitLab1
2025-01-03 2ee8ddb1ecac7df4198e54e08ec7f22daf4b07c0
packageBookService/pages/bookServices/detail/index.js
@@ -214,7 +214,8 @@
    protocolShow: false,
    protocolTxt: '',
    learnMenu: null,
    md5List: []
    md5List: [],
    editDialog: false
  },
  resetTree: function (e) {
@@ -271,8 +272,6 @@
      this.setData({
        tabValue: options.tabValue,
      });
    }
  },
@@ -293,7 +292,7 @@
    this.setData({
      num: Number(this.data.paperBookList.length) + Number(this.data.electronicBookList.length),
    });
    if (this.data.bookDetail) {
    if (this.data.bookDetail.id) {
      this.getBookInfo(this.data.bookDetail.id)
    }
  },
@@ -433,11 +432,14 @@
        protectedEpub: [],
        probationPage: [], //pdf试读页数
        freeEpubPage: [], //epub试读百分比
        bookEditor: [], //图书编辑
        contactInformation: [], //联系方式
      },
    };
    app.MG.store.getProductDetail(query).then(async (res) => {
      this.getResourceCode(id, res.datas.rootCmsItemId)
      console.log(res.datas, "res.datas")
      res.datas.bookEditor = res.datas.bookEditor ? res.datas.bookEditor : '-'
      res.datas.contactInformation = res.datas.contactInformation ? res.datas.contactInformation : '-'
      this.setData({
        bookDetail: res.datas,
        buyIdList: res.datas.purchasedSaleMethodIdList,
@@ -471,6 +473,16 @@
          }
          await this.getBookClass(classData);
        }
      }
      // 扫码从题库跳转回图书详情
      const localData = wx.getStorageSync('tabValue')
      if (localData) {
        this.setData({
          tabValue: localData
        })
        wx.removeStorage({
          key: 'tabValue',
        })
      }
      if (this.data.tabValue == 'questionBank' || this.data.tabValue == 'jsek_cloudLearning' || this.data.tabValue == 'jsek_teachingResources') {
        const checkData = this.data.cmsDatas.find(
@@ -515,7 +527,6 @@
        "bookDetail.paperPrice": this.numFormat(
          this.data.bookDetail.paperPrice
        ),
      });
    });
  },
@@ -748,6 +759,14 @@
      }
    }
  },
  // 联系
  editPhone() {
    this.setData({
      editDialog: true
    })
  },
  // 我要建议
  suggestBtn() {
    // 检查登录状态
@@ -1166,9 +1185,8 @@
              });
            }
          } else {
            if (isTSFW.length > 0) {
              data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder' && (item.childrenFolderCount > 0 || item.childrenCount > 0) && (item.name !== '填空题' &&
              data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder' && item.refCode != 'jsek_interaction' && (item.childrenFolderCount > 0 || item.childrenCount > 0) && (item.name !== '填空题' &&
                item.name !== '判断题' &&
                item.name !== '多选题' &&
                item.name !== '简答题') && item.name !== '单选题')
@@ -1176,7 +1194,7 @@
                jslx: false,
              });
            } else {
              data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder' && item.refCode != 'jsek_interaction')
              data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder')
              // && item.refCode != 'jsek_interaction'
              that.setData({
                jslx: true,
@@ -1903,7 +1921,6 @@
  // 云学习全部购买
  async buyCloudLearnClass() {
    const cloundMenu = this.data.resourceCodeList.find((item) => item.refCode == 'jsek_cloudLearning')
    debugger
    let query = {
      remarks: '云学习',
      requests: [{
@@ -1993,7 +2010,7 @@
      requests: [{
        saleMethodId: this.data.bankSaleData.Id,
        storeEventId: null,
        agentCode: "电子书",
        agentCode: "云测试",
      }, ],
    };
    app.MG.store.addShoppingCart(query).then(res => {