From 20f565e134743664045fc42376ef5acd826acbe3 Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期一, 25 八月 2025 19:36:44 +0800
Subject: [PATCH] 组件更新

---
 src/books/preventiveDentistry/view/components/index.vue |   57 ++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/src/books/preventiveDentistry/view/components/index.vue b/src/books/preventiveDentistry/view/components/index.vue
index c424929..832614f 100644
--- a/src/books/preventiveDentistry/view/components/index.vue
+++ b/src/books/preventiveDentistry/view/components/index.vue
@@ -9,32 +9,44 @@
       transformOrigin: 'center top',
     }">
       <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader>
-      <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterOne>
-      <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterTwo>
-      <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterThree>
-      <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterFour>
-      <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterFive>
-      <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterSix>
-      <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterSeven>
-      <chapterEight v-if="showCatalogList.indexOf(9) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterEight v-if="showCatalogList.indexOf(9) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterEight>
-      <chapterNine v-if="showCatalogList.indexOf(10) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterNine v-if="showCatalogList.indexOf(10) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterNine>
-      <chapterTen v-if="showCatalogList.indexOf(11) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterTen v-if="showCatalogList.indexOf(11) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterTen>
-      <chapterEleven v-if="showCatalogList.indexOf(12) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterEleven v-if="showCatalogList.indexOf(12) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterEleven>
-      <chapterTwelve v-if="showCatalogList.indexOf(13) > -1" :showPageList="loadPageList" :resourceList="resourceList">
+      <chapterTwelve v-if="showCatalogList.indexOf(13) > -1" :showPageList="loadPageList"
+        :getResourceInfo="resourceListFun">
       </chapterTwelve>
       <chapterThirteen v-if="showCatalogList.indexOf(14) > -1" :showPageList="loadPageList"
-        :resourceList="resourceList">
+        :getResourceInfo="resourceListFun">
       </chapterThirteen>
     </div>
   </div>
@@ -81,7 +93,7 @@
       audioPath: "",
       currentTime: null,
       videoList: [],
-      resourceList: {},
+      resourceList: [],
     };
   },
   computed: {
@@ -112,7 +124,6 @@
         // 鍚姩椤电爜瑙傚療
         setTimeout(() => {
           this.initObservation();
-          this.initThemeColor();
         }, 500);
       },
     },
@@ -124,6 +135,7 @@
           this.initViewer();
           this.closeAudio();
           this.closeVideo();
+          this.initThemeColor();
         }, 200);
       },
     },
@@ -142,6 +154,8 @@
     },
   },
   mounted() {
+    console.log("666");
+    
     // 榛樿鍔犺浇绔犺妭
     this.showCatalogList = [1];
     // 婊氬姩鐩戝惉鑺傛祦
@@ -197,13 +211,12 @@
     // 鍚姩椤电爜瑙傚療
     setTimeout(() => {
       this.initObservation();
-      this.initThemeColor();
     }, 500);
 
     // 娴嬭瘯椤甸潰璺宠浆
-    // setTimeout(() => {
-    //   this.gotoPage(14, 196);
-    // }, 500);
+    setTimeout(() => {
+      this.gotoPage(2, 14);
+    }, 500);
 
     // const pageDom = (this.container ? this.container : document)
     //   .querySelector("#app")
@@ -242,6 +255,12 @@
           ? process.env.VUE_APP_BOOK_ID
           : "preventiveDentistry")
       );
+      console.log(this.resourceList, "resourceList");
+      
+    },
+    resourceListFun(id, key) {
+      let data = this.resourceList.find(item => item.key == id)
+      return key ? data[key] : data
     },
     // 婊氬姩鐩戝惉
     scrollFun(event) {

--
Gitblit v1.9.1