From bd459420ad636263be458374319c20d3eeb6f61a Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期四, 19 九月 2024 21:09:04 +0800 Subject: [PATCH] detail --- assets/js/middleGround/tool.js | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/assets/js/middleGround/tool.js b/assets/js/middleGround/tool.js index c9dfde1..ecbcd87 100644 --- a/assets/js/middleGround/tool.js +++ b/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' // 澶勭悊鍒楄〃鏌ヨ缁撴灉 @@ -255,14 +257,16 @@ } } } - if (subItem.productLinkInfo && subItem.productLinkInfo.length) + if (subItem.productLinkInfo && subItem.productLinkInfo.length) { + let itemProductLinkInfo = subItem.productLinkInfo.find(citem => citem.Name == item.datas.Name) subItem.productLinkPath = - subItem.productLinkInfo[0].LinkPath + + itemProductLinkInfo?.LinkPath + "\\" + - subItem.productLinkInfo[0].CmsItemId; + itemProductLinkInfo?.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; } @@ -285,7 +289,7 @@ md5: linkItem.Md5, icon: linkItem.Icon, size: linkItem.Size, - metaData: JSON.parse(linkItem.MetaData ?? "{}"), + // metaData: JSON.parse(linkItem.MetaData ?? "{}"), order: linkItem.Order, protectType: linkItem.ProtectType, }; @@ -314,10 +318,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 +429,4 @@ if (width) src += `&width=${width}`; if (height) src += `&height=${height}`; return src; -} +} \ No newline at end of file -- Gitblit v1.9.1