From 8a66618254338978c6ea4315896e24c8571fc372 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期一, 15 七月 2024 18:54:06 +0800
Subject: [PATCH] 资源

---
 packageBookService/pages/bookServices/detail/index.js |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 0253763..870f733 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -808,9 +808,11 @@
       }
     }
     //缁欐暟缁勯噷闈㈠啀娣诲姞涓�涓猚hildren鐨勭┖鏁扮粍
+    // let addnum1 = pathLength - path.length == 6 ? 6 : 7
     for (const i of newArr) {
       i.children = []
-      this.getTreeList(rootList, pathLength + addNum, i.children, i.productLinkPath, addNum)
+      let addnum1 = i.productLinkPath.length - path.length == 6 ? 6 : 7
+      this.getTreeList(rootList, pathLength + addnum1, i.children, i.productLinkPath, addnum1)
       if (i.children.length == 0) {
         delete i.children
       }
@@ -894,6 +896,7 @@
       },
     }
     app.MG.store.getProductDetailNoChildren(query).then((res) => {
+      console.log(res.datas.cmsDatas[0].datas, 2345)
       if (!res.datas.cmsDatas[0].datas.length) {
         return this.setData({
           noResources: true,
@@ -937,12 +940,13 @@
             })
           }
         }
-        const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6
+        console.log(query.cmsPath, 111)
+        const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 14 ? 8 : 6
         const num = query.cmsPath.length + addNum
         this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\', addNum)
         list = this.ensureTreeConsistency(list)
         list = this.changeResourceChildren(list)
-        console.log('淇敼鍚庝簯', list);
+        console.log('淇敼鍚�', list);
         let result = [];
         if (type.refCode == "jsek_teachingResources") {
           this.findChildIds(list, result);
@@ -1028,7 +1032,8 @@
             if (data.length > 0) {
               let list = []
               // 娴嬭瘯 6浣�// 姝e紡 5浣�//  娴嬭瘯璋冪敤浼�20锛屽唴閮�7  姝e紡璋冪敤浼�17 鍐呴儴浼�6
-              const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6
+
+              const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 14 ? 8 : 6
               const num = query.cmsPath.length + addNum
               this.getTreeList(data, num, list, '\\', addNum)
               list = this.ensureTreeConsistency(list)

--
Gitblit v1.9.1