闫增涛
2024-04-29 558845242a07b68f42fa1802c45ab2769395d8b8
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
@@ -288,7 +288,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);