From 1a5e46e6955225675d21fe04962e82b37e7890ed Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期二, 15 十月 2024 16:02:26 +0800
Subject: [PATCH] ziyuan

---
 assets/js/middleGround/tool.js |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/assets/js/middleGround/tool.js b/assets/js/middleGround/tool.js
index dd46872..f7f7370 100644
--- a/assets/js/middleGround/tool.js
+++ b/assets/js/middleGround/tool.js
@@ -151,6 +151,7 @@
 
 // 澶勭悊璇︽儏鏌ヨ缁撴灉
 export function handleDetailQueryRequestData({
+  productId,
   item,
   fields,
   path,
@@ -257,11 +258,13 @@
             }
           }
         }
-        if (subItem.productLinkInfo && subItem.productLinkInfo.length)
+        if (subItem.productLinkInfo && subItem.productLinkInfo.length) {
+          let itemProductLinkInfo = subItem.productLinkInfo.find(citem => citem.ProductId == productId)
           subItem.productLinkPath =
-          subItem.productLinkInfo[0].LinkPath +
-          "\\" +
-          subItem.productLinkInfo[0].CmsItemId;
+            itemProductLinkInfo?.LinkPath +
+            "\\" +
+            itemProductLinkInfo?.CmsItemId;
+        }
         if (subItem.linkInfo && subItem.linkInfo.length)
           subItem.linkPath =
           subItem.linkInfo[0].LinkPath + "\\" + subItem.linkInfo[0].CmsItemId;
@@ -287,7 +290,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,
     };

--
Gitblit v1.9.1