litian
2024-03-29 4b5f1f7ed3460df9465e5071a59b8105cbc9146e
assets/js/middleGround/tool.js
@@ -1,4 +1,6 @@
import { requestCtx } from "../config";
import {
  requestCtx
} from "../config";
// import defaultImg from "../../../images/default-book-img.png" 
import moment from 'moment'
// 处理列表查询结果
@@ -257,12 +259,12 @@
        }
        if (subItem.productLinkInfo && subItem.productLinkInfo.length)
          subItem.productLinkPath =
            subItem.productLinkInfo[0].LinkPath +
            "\\" +
            subItem.productLinkInfo[0].CmsItemId;
          subItem.productLinkInfo[0].LinkPath +
          "\\" +
          subItem.productLinkInfo[0].CmsItemId;
        if (subItem.linkInfo && subItem.linkInfo.length)
          subItem.linkPath =
            subItem.linkInfo[0].LinkPath + "\\" + subItem.linkInfo[0].CmsItemId;
          subItem.linkInfo[0].LinkPath + "\\" + subItem.linkInfo[0].CmsItemId;
      }
      linkItemsMap[tag] = sdata.datas;
    }
@@ -314,10 +316,10 @@
  item.linkRepoId = item.datas.LinkRepository;
  item.childrenCount = parseInt(item.datas.ChildrenCount ?? "0");
  (item.childrenFolderCount = parseInt(item.datas.ChildrenFolderCount ?? "0")),
    (item.childrenChannelCount = parseInt(
      item.datas.ChildrenChannelCount ?? "0"
    )),
    (item.linkId = parseInt(item.datas.LinkId));
  (item.childrenChannelCount = parseInt(
    item.datas.ChildrenChannelCount ?? "0"
  )),
  (item.linkId = parseInt(item.datas.LinkId));
  item.linkOrg = JSON.parse(item.datas.LinkOrg ?? "[]")[0];
  item.linkDepartment = JSON.parse(item.datas.LinkDepartment ?? "[]")[0];
  item.linkInfo = JSON.parse(item.datas.LinkInfo ?? "[]");
@@ -425,4 +427,4 @@
  if (width) src += `&width=${width}`;
  if (height) src += `&height=${height}`;
  return src;
}
}