litian
2024-07-11 3f62d09217740b02d45bad3e6791916a9f11695c
packageBookService/pages/bookServices/detail/index.js
@@ -190,7 +190,7 @@
    // this.getResourceClass(); // 获取资源所属分类
    const token = wx.getStorageSync(app.config.tokenKey);
    if (token) {
      this.getShoppingCartProductGet();
      this.getApplyInfo(options.id);
      this.getAlreadyPBookList();
      this.getAlreadyEBookList();
@@ -573,6 +573,9 @@
          });
        }
      }
      if (!this.data.buy && this.data.bookDetail.isSell == '1') {
        this.getShoppingCartProductGet();
      }
    });
  },
  // 获取图书分类
@@ -900,6 +903,7 @@
          loading: false,
        });
      }
      console.log(res.datas.cmsDatas[0].datas, "资源")
      let list = []
      // 测试 6位// 正式 5位//  测试调用传20,内部7  正式调用传17 内部传6
      //教学资源 云学习
@@ -937,7 +941,7 @@
            })
          }
        }
        const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6
        const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 13 ? 8 : 6
        const num = query.cmsPath.length + addNum
        this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\', addNum)
        list = this.ensureTreeConsistency(list)
@@ -1028,7 +1032,7 @@
            if (data.length > 0) {
              let list = []
              // 测试 6位// 正式 5位//  测试调用传20,内部7  正式调用传17 内部传6
              const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6
              const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 13 ? 8 : 6
              const num = query.cmsPath.length + addNum
              this.getTreeList(data, num, list, '\\', addNum)
              list = this.ensureTreeConsistency(list)