From 4ff508548b71346c97ef563b3dd5ba9291afe342 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期五, 12 七月 2024 17:37:02 +0800
Subject: [PATCH] 教学资源接口去掉childcount参数

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

diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 990357d..0253763 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -190,7 +190,7 @@
     // this.getResourceClass(); // 鑾峰彇璧勬簮鎵�灞炲垎绫�
     const token = wx.getStorageSync(app.config.tokenKey);
     if (token) {
-
+      this.getShoppingCartProductGet();
       this.getApplyInfo(options.id);
       this.getAlreadyPBookList();
       this.getAlreadyEBookList();
@@ -573,9 +573,6 @@
           });
         }
       }
-      if (!this.data.buy && this.data.bookDetail.isSell == '1') {
-        this.getShoppingCartProductGet();
-      }
     });
   },
   // 鑾峰彇鍥句功鍒嗙被
@@ -896,14 +893,13 @@
         size: 999
       },
     }
-    app.MG.store.getProductDetail(query).then((res) => {
+    app.MG.store.getProductDetailNoChildren(query).then((res) => {
       if (!res.datas.cmsDatas[0].datas.length) {
         return this.setData({
           noResources: true,
           loading: false,
         });
       }
-      console.log(res.datas.cmsDatas[0].datas, "璧勬簮")
       let list = []
       // 娴嬭瘯 6浣�// 姝e紡 5浣�//  娴嬭瘯璋冪敤浼�20锛屽唴閮�7  姝e紡璋冪敤浼�17 鍐呴儴浼�6
       //鏁欏璧勬簮 浜戝涔�
@@ -941,7 +937,7 @@
             })
           }
         }
-        const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 13 ? 8 : 6
+        const addNum = query.cmsPath.length > 12 ? 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)
@@ -1032,7 +1028,7 @@
             if (data.length > 0) {
               let list = []
               // 娴嬭瘯 6浣�// 姝e紡 5浣�//  娴嬭瘯璋冪敤浼�20锛屽唴閮�7  姝e紡璋冪敤浼�17 鍐呴儴浼�6
-              const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 13 ? 8 : 6
+              const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6
               const num = query.cmsPath.length + addNum
               this.getTreeList(data, num, list, '\\', addNum)
               list = this.ensureTreeConsistency(list)
@@ -1147,7 +1143,7 @@
       for (let i = 0; i < data.length; i++) {
         if (index < 3) {
           const item = data[i]
-          if (item.childrenFolderCount > 0) {
+          if (item.children && item.children.length > 0) {
             result.push(item.id)
             if (item.children) {
               for (let j = 0; j < item.children.length; j++) {

--
Gitblit v1.9.1