From df95501a7d85d5490f3720dac7f93ecb05bfe85e Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 11 十月 2024 18:20:34 +0800
Subject: [PATCH] shuzhan

---
 pages/digitalCourses/digitalCoursesDetails/index.js |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js
index aaa522c..344b8b8 100644
--- a/pages/digitalCourses/digitalCoursesDetails/index.js
+++ b/pages/digitalCourses/digitalCoursesDetails/index.js
@@ -179,6 +179,9 @@
     this.digitalCoursesDetailsGet(options.id)
     this.getPlayerList()
     this.getType()
+    // this.setData({
+    //   userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
+    // })
   },
 
   /**
@@ -192,11 +195,12 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
    */
   onShow() {
-    if (this.data.tabValue == 2) {
+    if (this.data.tabValue == 2 && this.data.selectActive == 'learn') {
+      console.log(12333)
       this.getPlayerList()
       this.getResource()
+      this.getRelationBook()
     }
-
   },
 
   /**
@@ -240,6 +244,7 @@
         keys: [this.data.bookId + '']
       })
       .then((res) => {
+        console.log(1, res);
         if (res.length > 0) {
           this.setData({
             playerList: JSON.parse(res[0].value)
@@ -545,13 +550,11 @@
               learnList: list,
               openTeachids: result,
             });
-            console.log(1, this.data.learnList, this.data.playerList)
           }
         } else {
           const data = test.filter(
             (item) => item.type == 'questionBankFolder' && item.childrenFolderCount > 0
           )
-
           if (data.length > 0) {
             let list = []
             let addNum = query.cmsPath.length > 5 ? 7 : query.cmsPath.length > 6 ? 8 : 6
@@ -559,8 +562,8 @@
             this.getTreeList(data, num, list, '\\', addNum)
             list = this.ensureTreeConsistency(list)
             let result = [];
-            this.findChildIds(list[0].children, result)
-            this.countLeafNodes(list[0].children)
+            this.findChildIds(list[0]?.children, result)
+            this.countLeafNodes(list[0]?.children)
             this.setData({
               testList: list[0].children,
               openTeachids: result,

--
Gitblit v1.9.1