From 609989d5dd46d2611b42f7d508f67ec89b355562 Mon Sep 17 00:00:00 2001
From: user1 <10901603+no-distractions1@user.noreply.gitee.com>
Date: 星期一, 17 六月 2024 15:17:43 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout

---
 src/books/childHealth/view/content/index.vue |   34 +++++++++++++++++++++++++++++-----
 1 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/books/childHealth/view/content/index.vue b/src/books/childHealth/view/content/index.vue
index 843a3da..cc40f13 100644
--- a/src/books/childHealth/view/content/index.vue
+++ b/src/books/childHealth/view/content/index.vue
@@ -21,51 +21,61 @@
         v-if="showCatalogList.indexOf(2) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterOne>
       <chapterTwo
         v-if="showCatalogList.indexOf(3) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterTwo>
       <chapterThree
         v-if="showCatalogList.indexOf(4) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterThree>
       <chapterFour
         v-if="showCatalogList.indexOf(5) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterFour>
       <chapterFive
         v-if="showCatalogList.indexOf(6) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterFive>
       <chapterSix
         v-if="showCatalogList.indexOf(7) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterSix>
       <chapterSeven
         v-if="showCatalogList.indexOf(8) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterSeven>
       <chapterEight
         v-if="showCatalogList.indexOf(9) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterEight>
       <chapterNine
         v-if="showCatalogList.indexOf(10) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterNine>
       <chapterTen
         v-if="showCatalogList.indexOf(11) > -1"
         :showPageList="loadPageList"
         :questionData="questionDataMap"
+        @closeVideo="closeVideo"
       ></chapterTen>
       <chapterEleven
         v-if="showCatalogList.indexOf(12) > -1"
@@ -242,7 +252,7 @@
     //     ids: ["2ACA9359"]
     //   });
     // }, 2000);
-    //   }, 5000);
+      // }, 500);
 
     // const pageDom = (this.container ? this.container : document)
     //   .querySelector("#app")
@@ -699,10 +709,10 @@
           spaceBetween: 30, // 闂撮殧
           // 濡傛灉闇�瑕佸墠杩涘悗閫�鎸夐挳
           navigation: {
-            nextEl: (this.container ? this.container : document).querySelector(
+            nextEl: dom.querySelector(
               ".swiper-button-next"
             ),
-            prevEl: (this.container ? this.container : document).querySelector(
+            prevEl: dom.querySelector(
               ".swiper-button-prev"
             )
           },
@@ -731,10 +741,10 @@
           spaceBetween: 30, // 闂撮殧
           // 濡傛灉闇�瑕佸墠杩涘悗閫�鎸夐挳
           navigation: {
-            nextEl: (this.container ? this.container : document).querySelector(
+            nextEl: dom.querySelector(
               ".swiper-button-next"
             ),
-            prevEl: (this.container ? this.container : document).querySelector(
+            prevEl: dom.querySelector(
               ".swiper-button-prev"
             )
           },
@@ -896,6 +906,20 @@
       this.highlightData = data;
       // 璺宠浆
       this.gotoPage(data.catalog, data.page, () => {});
+    },
+    closeVideo(path) {
+      let allVideo = (
+        this.container ? this.container : document
+      ).querySelectorAll(".video");
+      allVideo = Array.from(allVideo);
+      if(allVideo.length) {
+        for (let index = 0; index < allVideo.length; index++) {
+          const item = allVideo[index];
+          if(item.currentSrc != path) {
+            item.pause()
+          }
+        }
+      }
     }
   },
   components: {

--
Gitblit v1.9.1