QYF-GitLab1
2025-07-23 23f872505d56a06183f55964f40ee697817e1858
packageDomain/pages/resourceDetails/document/index.js
@@ -86,6 +86,7 @@
      applyState: options.applyState,
      deadline: options.deadline,
      formPath: options.formPath,
      source: options.source,
    })
    if (options.formPath == 'jsek_cloudLearning') {
      this.setData({
@@ -232,7 +233,8 @@
    if (this.data.storeInfo) query['storeInfo'] = this.data.storeInfo
    app.MG.store.getProductDetail(query).then(async (res) => {
      this.setData({
        bookDetail: res.datas
        bookDetail: res.datas,
        bookName: res.datas.name,
      })
      this.resourceDetailsData();
    });
@@ -284,12 +286,13 @@
        if (data) return data;
      })
      let isBuy = 1;
      // ###这里的逻辑是从最子层开始判断,最子层的salemethod优先级最高,如果将云学习的salemethod优先级设为最高,需要在判断前,将dataList中的云学习通过refcode滤出,先判断云学习,再判断后续的代码
      for (let i = 0; i < dataList.length; i++) {
        const dataItem = dataList[i];
        if (dataItem) {
          if (dataItem.saleMethod.length > 0) {
            isBuy = 2;
            if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1) {
            if (this.data.bookDetail.purchasedSaleMethodIdList.indexOf(dataItem.saleMethod[0].Id) > -1 || dataItem.saleMethod[0].Price == 0) {
              isBuy = 3;
              break;
            } else {
@@ -306,7 +309,7 @@
          wx.hideLoading();
          wx.showModal({
            title: '温馨提示',
            content: '该资源未购买,将返回购买',
            content: '该资源未激活或购买,即将返回图书详情页面',
            success: (res) => {
              if (res.confirm) {
                if (this.data.source == 'qrcode') {