闫增涛
2024-04-30 dc934dfd63fecff84d0bf996418e041b9bd4ea59
packageBookService/pages/bookServices/detail/buyResource/index.js
@@ -127,7 +127,7 @@
  // 扁平化数据转换tree
  getTreeList(rootList, pathLength, newArr, path) {
    for (const item of rootList) {
      if (item.productLinkPath.length == pathLength && item.productLinkPath.includes(path)) {
      if ((pathLength - item.productLinkPath.length >= 0 && pathLength - item.productLinkPath.length <= 3) && item.productLinkPath.includes(path)) {
        if (item.sysType == 'CmsItem') {
          if (item.selectType == 'webpage') {
            item.disabled = true
@@ -234,6 +234,7 @@
      itemFields: {
        SysType: 'CmsFolder',
        // 资源类型,试读文件,是否允许下载等参数
        learnSelectType: [],
        selectType: [],
        freeFile: [],
        file: [],
@@ -288,7 +289,8 @@
        //   })
        // }
        // debugger
        this.getTreeList(res.datas.cmsDatas[0].datas, 17, list, '\\')
        const num = query.cmsPath.length + 6
        this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\')
        list = this.ensureTreeConsistency(list)
        list = this.changeResourceChildren(list)
        console.log('修改后云', list);