From c20313290a710302ba68c3af2e8aa9ab162ad00b Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期三, 05 三月 2025 16:09:41 +0800
Subject: [PATCH] 0~3岁婴幼儿抚育与教育分页完成

---
 src/books/meetingPlanners/view/components/index.vue |   90 ++++++++++++++++++++++++---------------------
 1 files changed, 48 insertions(+), 42 deletions(-)

diff --git a/src/books/meetingPlanners/view/components/index.vue b/src/books/meetingPlanners/view/components/index.vue
index b8ee3f7..a8ec4a6 100644
--- a/src/books/meetingPlanners/view/components/index.vue
+++ b/src/books/meetingPlanners/view/components/index.vue
@@ -9,9 +9,12 @@
       transformOrigin: 'center top',
     }">
       <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader>
-      <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"></chapterOne>
-      <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"></chapterTwo>
-      <chapterThree  v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"></chapterThree>
+      <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"
+        :interfaceQuestion="questionDataMap"></chapterOne>
+      <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"
+        :interfaceQuestion="questionDataMap"></chapterTwo>
+      <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"
+        :interfaceQuestion="questionDataMap"></chapterThree>
     </div>
   </div>
 </template>
@@ -22,6 +25,8 @@
 import chapterTwo from "./chapter002.vue";
 import chapterThree from "./chapter003.vue";
 import NoteIcon from "@/assets/images/biji.png";
+import getQuestionList from "@/assets/methods/examination";
+import testData from "../../assets/examinationList";
 import _ from "lodash";
 import Swiper from "swiper/bundle";
 import "swiper/swiper-bundle.css";
@@ -100,7 +105,6 @@
     // 榛樿鍔犺浇绔犺妭
     this.showCatalogList = [1];
     // 婊氬姩鐩戝惉鑺傛祦
-    debugger
     this.throttledScrollHandler = _.throttle(
       this.scrollFun,
       this.throttleThreshold,
@@ -156,7 +160,7 @@
 
     //娴嬭瘯椤甸潰璺宠浆
     // setTimeout(() => {
-    //   this.gotoPage(2, 15);
+    //   this.gotoPage(2, 22);
       //   setTimeout(() => {
       //     this.renderSign("Highlight", {
       //       id: "2ACA9359",
@@ -169,7 +173,7 @@
       //   this.delSign({
       //     ids: ["2ACA9359"]
       //   });
-      // }, 2000);
+    //   // }, 2000);
     // }, 500);
 
     // const pageDom = (this.container ? this.container : document)
@@ -216,7 +220,6 @@
         ) {
           console.log(1);
 
-          debugger
           // 鍒拌揪闃堝��
           if (
             this.showCatalogList[this.showCatalogList.length - 1] <
@@ -530,6 +533,7 @@
       });
     },
     loadPageCallback(entries, observer) {
+      // console.log(entries,1234);
       entries.forEach(async (entry) => {
         if (entry.isIntersecting) {
           const target = entry.target;
@@ -542,30 +546,30 @@
             // 娣诲姞椤电爜
             this.loadPageList.push(Number(page));
             const catalog = catalogDom.getAttribute("num");
-            // if (!this.questionDataMap[page]) {
-            //   if (testData && testData[catalog]) {
-            //     if (testData[catalog][page]) {
-            //       if (Array.isArray(testData[catalog][page])) {
-            //         this.questionDataMap[page] = await getQuestionList(
-            //           page,
-            //           testData[catalog][page],
-            //           this.config.activeBook
-            //         );
-            //       } else {
-            //         const obj = {};
-            //         for (let key in testData[catalog][page]) {
-            //           obj[key] = await getQuestionList(
-            //             [],
-            //             testData[catalog][page][key],
-            //             this.config.activeBook
-            //           );
-            //         }
-            //         this.questionDataMap[page] = obj;
-            //       }
-            //       console.log("棰樼洰", this.questionDataMap);
-            //     }
-            //   }
-            // }
+            if (!this.questionDataMap[page]) {
+              if (testData && testData[catalog]) {
+                if (testData[catalog][page]) {
+                  if (Array.isArray(testData[catalog][page])) {
+                    this.questionDataMap[page] = await getQuestionList(
+                      page,
+                      testData[catalog][page],
+                      this.config.activeBook
+                    );
+                  } else {
+                    const obj = {};
+                    for (let key in testData[catalog][page]) {
+                      obj[key] = await getQuestionList(
+                        [],
+                        testData[catalog][page][key],
+                        this.config.activeBook
+                      );
+                    }
+                    this.questionDataMap[page] = obj;
+                  }
+                  console.log("棰樼洰", this.questionDataMap);
+                }
+              }
+            }
             // 娓叉煋杩欎竴椤电殑鏍囪
             for (const key in this.renderSignMap) {
               if (this.renderSignMap[key][page]) {
@@ -722,7 +726,7 @@
         pageExample = new pageComponent({
           propsData: {
             showPageList: [],
-            questionData: {},
+            interfaceQuestion: {},
             isSearch: true,
           },
         });
@@ -754,7 +758,7 @@
             pageExample = new pageComponent({
               propsData: {
                 showPageList: [pageNum],
-                questionData: {},
+                interfaceQuestion: {},
                 isSearch: true,
               },
             });
@@ -902,19 +906,21 @@
     },
     // 瑙嗛灏忕獥
     handleVideoPicture() {
-      let doms = (
-        this.container ? this.container : document
-      ).querySelectorAll(".video");
-      doms = Array.from(doms)
-      if (!doms.length) return false
-      const playVudio = doms
-        .reverse()
-        .find((item) => item.paused == false);
+      let doms = (this.container ? this.container : document).querySelectorAll(
+        ".video"
+      );
+      doms = Array.from(doms);
+      if (!doms.length) return false;
+      const playVudio = doms.reverse().find((item) => item.paused == false);
       if (playVudio) {
         const bottomGap = playVudio.getBoundingClientRect().bottom;
         const topGap = playVudio.getBoundingClientRect().top;
         if (bottomGap < 0 || topGap > window.innerHeight) {
-          if (playVudio.readyState) playVudio.requestPictureInPicture();
+          try {
+            if (playVudio.readyState) playVudio.requestPictureInPicture();
+          } catch (error) {
+            console.log(error, "灏忕獥閿欒error");
+          }
         }
       }
     },

--
Gitblit v1.9.1