From aff8d054df4a638f399dc8f15d98c19b9c9aa785 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期二, 29 四月 2025 10:11:25 +0800
Subject: [PATCH] 扫码视频播放

---
 assets/js/middleGround/tool.js |   27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/assets/js/middleGround/tool.js b/assets/js/middleGround/tool.js
index c9dfde1..f7f7370 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'
 // 澶勭悊鍒楄〃鏌ヨ缁撴灉
@@ -149,6 +151,7 @@
 
 // 澶勭悊璇︽儏鏌ヨ缁撴灉
 export function handleDetailQueryRequestData({
+  productId,
   item,
   fields,
   path,
@@ -255,14 +258,16 @@
             }
           }
         }
-        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 +
+            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 +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,
     };
@@ -314,10 +319,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 +430,4 @@
   if (width) src += `&width=${width}`;
   if (height) src += `&height=${height}`;
   return src;
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1