1
YM
2024-09-10 e38c14de9637d22d0a35ae06bede82dcf31b64ec
packageBookService/pages/bookServices/detail/buyResource/index.js
@@ -19,8 +19,8 @@
    checkAllState: true,
    productLinkPath: '',
    refCode: '',
    haider: false,
    naData: false
    naData: false,
    bookRefCode: []
  },
  /**
@@ -255,7 +255,6 @@
        return this.setData({
          noResources: true,
          loading: false,
          haider: true,
        });
      }
      let list = []
@@ -288,7 +287,6 @@
        //     noData: true
        //   })
        // }
        // debugger
        const num = query.cmsPath.length + 6
        this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\')
        list = this.ensureTreeConsistency(list)
@@ -318,7 +316,6 @@
            learn: list,
            loading: false,
            openLearnids: result,
            haider: true,
          });
        }
      }
@@ -360,7 +357,6 @@
          return this.setData({
            noResources: true,
            loading: false,
            haider: true,
          });
        }
        //教学资源 云学习
@@ -377,7 +373,6 @@
              this.setData({
                teach: list,
                loading: false,
                haider: true
              });
              this.findChildIds(this.data.teach, (this.data.openTeachids = []));
            } else if (type.refCode == "jsek_cloudLearning") {
@@ -390,7 +385,6 @@
                learn: list,
                loading: false,
                openLearnids: result,
                haider: true
              });
            }
            console.log(list, '云學習');
@@ -402,7 +396,6 @@
          this.setData({
            test: res.datas.cmsDatas[0].datas,
            loading: false,
            haider: true
          });
        } else {
          console.log("其他");
@@ -526,12 +519,34 @@
      //   productLinkPath: this.data.productLinkPath,
      //   refCode: this.data.refCode,
      // });
      // this.getResourceCode(
      //   res.datas.id,
      //   res.datas.rootCmsItemId
      // )
      this.getResourceDataList({
        productLinkPath: this.data.productLinkPath,
        refCode: this.data.refCode,
      })
    });
  },
  getResourceCode(bookId, cmsId) {
    let query = {
      path: '*',
      queryType: '*',
      productId: bookId,
      cmsPath: cmsId,
      itemFields: {
        SysType: 'Cms'
      },
      pading: {
        start: 99,
        size: 0
      }
    }
    app.MG.store.getProductDetail(query).then(res => {
      console.log('图书资源', res.datas.cmsDatas[0].datas);
    })
  },
  // 获取已购买商品
  getShoppingCartProductGet() {
@@ -572,7 +587,7 @@
      if (isSHow) {
        return false;
      } else {
        return data.saleMethod[0].price > 0 ? true : false;
        return data.saleMethod[0].Price > 0 ? true : false;
      }
      return !isSHow;
    } else {
@@ -638,6 +653,7 @@
      this.setData({
        resourceClassList: JSON.parse(res[0].config).option,
      });
    });
  },
  checkAll() {