YM
3 天以前 e40fa3df043df12622fd0b654cd3ea9c147b96d7
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({
@@ -284,12 +285,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 {