From c96612e8a63ecef9590be0f8b5199277ec94e5b9 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期三, 18 九月 2024 18:43:12 +0800
Subject: [PATCH] 云学习购买目录,修改bug

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

diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js
index a795cee..21b05e9 100644
--- a/pages/digitalCourses/digitalCoursesDetails/index.js
+++ b/pages/digitalCourses/digitalCoursesDetails/index.js
@@ -174,9 +174,10 @@
     this.digitalCoursesDetailsGet(options.id)
     this.getPlayerList()
     this.getType()
-    // this.setData({
-    //   userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
-    // })
+    this.setData({
+      userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
+    })
+    console.log('1', options.id);
   },
 
   /**
@@ -190,6 +191,10 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
    */
   onShow() {
+    if (this.data.tabValue == 2) {
+      this.getPlayerList()
+      this.getResource()
+    }
 
   },
 
@@ -481,7 +486,6 @@
         res.datas.cmsDatas[0].datas.forEach((item) => {
           if (item.type == 'questionBankFolder' || item.type == 'questionBankItem') {
             test.push(item)
-
           } else if (item.type != "resourceItem") {
             this.data.playerList.forEach(pItem => {
               if (pItem.cmsItemId == item.id) {
@@ -493,9 +497,7 @@
           if (item.type == 'productItem') {
             learnItemList.push(item)
           }
-
         })
-
         if (this.data.selectActive === 'learn') {
           let list = []
           // 娴嬭瘯 6浣�// 姝e紡 5浣�//  娴嬭瘯璋冪敤浼�20锛屽唴閮�7  姝e紡璋冪敤浼�17 鍐呴儴浼�6
@@ -514,6 +516,7 @@
               learnList: list,
               openTeachids: result,
             });
+            console.log(1, this.data.learnList, this.data.playerList)
           }
         } else {
           const data = test.filter(
@@ -878,6 +881,7 @@
             })
             .then((res) => {
               if (res) {
+                this.digitalCoursesDetailsGet(this.data.digitalsData.id);
                 wx.showToast({
                   title: "棰嗗彇鎴愬姛",
                   icon: "none",

--
Gitblit v1.9.1