From 304689614daa96595aeeeed8e46e5dfa992ef2df Mon Sep 17 00:00:00 2001
From: unknown <qq1940665526@163.com>
Date: 星期一, 17 六月 2024 17:33:33 +0800
Subject: [PATCH] 优化

---
 src/books/childHealth/view/content/components/chapter007.vue |   91 +++++++++++++++++++++++++++------------------
 1 files changed, 54 insertions(+), 37 deletions(-)

diff --git a/src/books/childHealth/view/content/components/chapter007.vue b/src/books/childHealth/view/content/components/chapter007.vue
index f60d4ec..61d378d 100644
--- a/src/books/childHealth/view/content/components/chapter007.vue
+++ b/src/books/childHealth/view/content/components/chapter007.vue
@@ -238,7 +238,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氱柧鐥呭熀纭�</p>
             </div>
@@ -638,7 +639,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氶仐浼犵梾銆佸嚭鐢熺己闄蜂笌浼樼敓</p>
             </div>
@@ -1099,7 +1101,7 @@
             <p class="center">
               <b
                 >鏂扮敓鍎挎姎瑙�<a id="w1"></a
-                ><a href="javascript: void(0)"><sup>[1]</sup></a></b
+                ><a href="javascript: void(0)" @click="gotoLabel('childSeven-labelOne')" class="cu-pr"><sup>[1]</sup></a></b
               >
             </p>
             <p class="block">
@@ -1332,7 +1334,7 @@
             </p>
           </div>
           <div class="annotation-border"></div>
-          <p class="note">
+          <p class="note" id="childSeven-labelOne">
             <a id="m1"></a><a href="javascript: void(0)">[1]</a>
             鏁寸悊鑷寳浜腑鍖昏嵂澶у涓滄柟鍖婚櫌鍎跨涓荤鎶ゅ笀鐜嬫絿鐩稿叧鏂囩珷銆�
           </p>
@@ -1388,7 +1390,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氬鍓嶅効绔ュ父瑙佺柧鐥呪�斺�旇偉鑳栫棁</p>
             </div>
@@ -1512,7 +1515,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛涓冿細瀛﹀墠鍎跨甯歌鐤剧梾鈥斺�旂淮鐢熺礌D缂轰箯鎬т綕鍋荤梾</p>
             </div>
@@ -1618,7 +1622,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氬鍓嶅効绔ュ父瑙佺柧鐥呪�斺�旂己閾佹�ц传琛�</p>
             </div>
@@ -1673,11 +1678,9 @@
                 姘斿�欑獊鍙橈紝骞煎効鍙楀噳銆佸彈鐑紱绌烘皵姹℃祳銆佽繃浜庣柌鍊︺�佽椽椋熸补鑵诲帤鍛崇瓑锛岄兘鍙娇鎶垫姉鍔涗笅闄嶏紝璇卞彂璇ョ梾銆�
               </p>
             </div>
-            <div class="right" style="width: 60%">
+            <div class="right" style="width: 60%;padding-top:20px">
               <video
-                :src="
-                 pathSix
-                "
+                :src="pathSix"
                 poster="../../../assets/images/chapterTwo/people-video-img.png"
                 webkit-playsinline="true"
                 x-webkit-airplay="true"
@@ -1687,7 +1690,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氬鍓嶅効绔ュ父瑙佺柧鐥呪�斺�斾笂鍛煎惛閬撴劅鏌�</p>
             </div>
@@ -1835,7 +1839,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氬鍓嶅効绔ュ父瑙佺柧鐥呪�斺�旈緥榻�</p>
             </div>
@@ -1915,7 +1920,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氬鍓嶅効绔ュ父瑙佺柧鐥呪�斺�斾腑鑰崇値</p>
             </div>
@@ -1961,7 +1967,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氬鍓嶅効绔ュ父瑙佺柧鐥呪�斺�斿急瑙�</p>
             </div>
@@ -2309,7 +2316,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氫紶鏌撶梾鍩虹鐭ヨ瘑鈥斺�旂壒鎬т笌涓変釜鐜妭</p>
             </div>
@@ -2528,7 +2536,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氫紶鏌撶梾鍙婂叾棰勯槻鈥斺�旂柅鑻�</p>
             </div>
@@ -2979,7 +2988,7 @@
             <span class="ml-30">瀛﹀墠鍎跨鍗敓涓庝繚鍋ワ紙绗�3鐗堬級</span>
           </div>
         </div>
-        <div class="padding-96">
+        <div class="padding-104">
           <h4 id="d280">锛堝崄浜岋級娌欑溂</h4>
           <p>娌欑溂鐢辨矙鐪艰。鍘熶綋鎰熸煋寮曡捣锛屾槸涓�绉嶆參鎬т紶鏌撴�х粨鑶滆鑶滅値銆�</p>
           <h5 id="e235">1.娴佽鐗圭偣</h5>
@@ -3162,7 +3171,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氫紶鏌撶梾鍙婂叾棰勯槻鈥斺�旂媯鐘梾</p>
             </div>
@@ -3285,7 +3295,8 @@
                 x5-playsinline=""
                 controls
                 controlslist="nodownload"
-                class="w100 video-border"
+                class="w100 video-border video"
+                @play="videoPlay"
               ></video>
               <p class="img">瑙嗛锛氬鍓嶅効绔ュ父瑙佸瘎鐢熻櫕鐥呪�斺�旇洸铏梾</p>
             </div>
@@ -3797,10 +3808,10 @@
   async mounted() {
     if(!this.isSearch) {
       const localData = localStorage.getItem("chapterSevenData");
-    if (localData) {
-      this.chapterSevenData = JSON.parse(localData);
-    }
-    this.getVideoPath()
+      if (localData) {
+        this.chapterSevenData = JSON.parse(localData);
+      }
+      this.getVideoPath()
     }
   },
   methods: {
@@ -3818,25 +3829,31 @@
       }
     },
     async getVideoPath() {
-      this.$data.pathOne = await getResourcePath("0853ca76cbf745ea4023d2949a4d41d4");
-      this.$data.pathTwo = await getResourcePath("95114c3e801192fb91b43e365b5aff83");
-      this.$data.pathThree = await getResourcePath("79aa2ccd431dcc000dbe2962ded4397c");
-      this.$data.pathFour = await getResourcePath("94654e3d22604a815f9f4558616d8f39");
-      this.$data.pathFive = await getResourcePath("2373520e42d1be7bb70fbd5729d2f860");
-      this.$data.pathSix = await getResourcePath("bf7cabfb18771490b5cbb2eebdf424a3");
-      this.$data.pathSeven = await getResourcePath("99a137c537d757a6ee39e6888218ca7c");
-      this.$data.pathEight = await getResourcePath("9a1e8e3374e3bdf82a5066ead76398ef");
-      this.$data.pathNine = await getResourcePath("7ae6133d91e84c4ea5c96d5d4ac62fb9");
-      this.$data.pathTen = await getResourcePath("04cc85ac870bb810166d4b90dd5594a5");
-      this.$data.pathEleven = await getResourcePath("17afacd49d1ed78eb6e3c46962a96e43");
-      this.$data.pathTwelve = await getResourcePath("6d4d4de4d5441d37c0b1190ae68a9532");
-      this.$data.pathThirteen = await getResourcePath("869bdc70fb1e80757e3f75c6aa605647");
+      this.pathOne = await getResourcePath("0853ca76cbf745ea4023d2949a4d41d4");
+      this.pathTwo = await getResourcePath("95114c3e801192fb91b43e365b5aff83");
+      this.pathThree = await getResourcePath("79aa2ccd431dcc000dbe2962ded4397c");
+      this.pathFour = await getResourcePath("94654e3d22604a815f9f4558616d8f39");
+      this.pathFive = await getResourcePath("2373520e42d1be7bb70fbd5729d2f860");
+      this.pathSix = await getResourcePath("bf7cabfb18771490b5cbb2eebdf424a3");
+      this.pathSeven = await getResourcePath("99a137c537d757a6ee39e6888218ca7c");
+      this.pathEight = await getResourcePath("9a1e8e3374e3bdf82a5066ead76398ef");
+      this.pathNine = await getResourcePath("7ae6133d91e84c4ea5c96d5d4ac62fb9");
+      this.pathTen = await getResourcePath("04cc85ac870bb810166d4b90dd5594a5");
+      this.pathEleven = await getResourcePath("17afacd49d1ed78eb6e3c46962a96e43");
+      this.pathTwelve = await getResourcePath("6d4d4de4d5441d37c0b1190ae68a9532");
+      this.pathThirteen = await getResourcePath("869bdc70fb1e80757e3f75c6aa605647");
     },
     saveChapterOneData() {
       localStorage.setItem(
         "chapterSevenData",
         JSON.stringify(this.chapterSevenData)
       );
+    },
+    gotoLabel(id) {
+      (this.container ? this.container : document).getElementById(id).scrollIntoView()
+    },
+    videoPlay(e) {
+      this.$emit('closeVideo',e.srcElement.currentSrc)
     }
   },
 };

--
Gitblit v1.9.1