From e5f45ec9c2eabaa3e4241caad2d49c3629eaf0c8 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期一, 30 九月 2024 14:18:40 +0800
Subject: [PATCH] loading

---
 packageDomain/pages/resourceDetails/myVideo/index.js |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js
index 41f8562..b051bc7 100644
--- a/packageDomain/pages/resourceDetails/myVideo/index.js
+++ b/packageDomain/pages/resourceDetails/myVideo/index.js
@@ -120,7 +120,7 @@
       })
       this.getLearnTime()
     }
-    this.getBookInfo(options.bookId)
+    this.getBookInfo(this.data.bookId)
   },
 
   /**
@@ -143,6 +143,10 @@
     if (wx.getStorageSync(app.config.tokenKey)) {
       let duration = this.data.pauseTime - this.data.startTime
       this.count(duration)
+      if (this.data.formPath == 'jsek_cloudLearning') {
+        let cloudDuration = this.data.pauseTime - this.data.learnStartTime
+        this.cloudCount(cloudDuration)
+      }
     }
     this.setPlayerList()
   },
@@ -159,7 +163,7 @@
       this.count(duration)
     }
     this.setPlayerList()
-    if (this.data.fromPath == 'jsek_cloudLearning') {
+    if (this.data.formPath == 'jsek_cloudLearning') {
       let cloudDuration = this.data.pauseTime - this.data.learnStartTime
       this.cloudCount(cloudDuration)
     }
@@ -223,13 +227,15 @@
       fields: {},
     };
     app.MG.store.getProductDetail(query).then(async (res) => {
-      console.log('鍥句功璇︽儏', res);
       this.setData({
         bookDetail: res.datas,
         buyIdList: res.datas.purchasedSaleMethodIdList,
-        learnClassData: res.datas.cmsDatas[0].datas.find(item => item.refCode == "jsek_cloudLearning")
+        learnClassData: res.datas.length > 0 ? res.datas.cmsDatas[0].datas.find(item => item.refCode == "jsek_cloudLearning") : null
       })
-      this.getResourceDataList(this.data.learnClassData)
+      if (this.data.learnClassData) {
+        this.getResourceDataList(this.data.learnClassData)
+      }
+
     });
   },
   // 鏁欏璧勬簮 浜戝涔� 鑾峰彇

--
Gitblit v1.9.1