litian
2024-07-15 8a66618254338978c6ea4315896e24c8571fc372
资源
1个文件已修改
13 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/index.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js
@@ -808,9 +808,11 @@
      }
    }
    //给数组里面再添加一个children的空数组
    // let addnum1 = pathLength - path.length == 6 ? 6 : 7
    for (const i of newArr) {
      i.children = []
      this.getTreeList(rootList, pathLength + addNum, i.children, i.productLinkPath, addNum)
      let addnum1 = i.productLinkPath.length - path.length == 6 ? 6 : 7
      this.getTreeList(rootList, pathLength + addnum1, i.children, i.productLinkPath, addnum1)
      if (i.children.length == 0) {
        delete i.children
      }
@@ -894,6 +896,7 @@
      },
    }
    app.MG.store.getProductDetailNoChildren(query).then((res) => {
      console.log(res.datas.cmsDatas[0].datas, 2345)
      if (!res.datas.cmsDatas[0].datas.length) {
        return this.setData({
          noResources: true,
@@ -937,12 +940,13 @@
            })
          }
        }
        const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6
        console.log(query.cmsPath, 111)
        const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 14 ? 8 : 6
        const num = query.cmsPath.length + addNum
        this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\', addNum)
        list = this.ensureTreeConsistency(list)
        list = this.changeResourceChildren(list)
        console.log('修改后云', list);
        console.log('修改后', list);
        let result = [];
        if (type.refCode == "jsek_teachingResources") {
          this.findChildIds(list, result);
@@ -1028,7 +1032,8 @@
            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 > 14 ? 8 : 6
              const num = query.cmsPath.length + addNum
              this.getTreeList(data, num, list, '\\', addNum)
              list = this.ensureTreeConsistency(list)