From 1f6a191b738ab6d8c1ff7c3804eabb454e09c269 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 03 六月 2024 15:04:10 +0800
Subject: [PATCH] 资源请求优化

---
 src/books/artAndDance/view/components/chapter002.vue |   62 +++++++++++++++++++++++++++----
 1 files changed, 54 insertions(+), 8 deletions(-)

diff --git a/src/books/artAndDance/view/components/chapter002.vue b/src/books/artAndDance/view/components/chapter002.vue
index c43ba39..36c736e 100644
--- a/src/books/artAndDance/view/components/chapter002.vue
+++ b/src/books/artAndDance/view/components/chapter002.vue
@@ -1,8 +1,9 @@
 <template>
   <div class="chapter" num="3">
-    <div class="page-box" page="8">
+    <div class="page-box" page="8" style="min-height: auto;">
       <div v-if="showPageList.indexOf(8) > -1">
         <img class="img-0" alt="" src="../../assets/images/dy2.jpg" />
+        <img src="../../assets/images/03-2.gif" alt="" style="width: 55%;" class="cover-gif">
       </div>
     </div>
     <div class="page-box" page="9">
@@ -14,11 +15,16 @@
         />
         <div class="padding-96">
           <p class="center">
-            <img class="img-b" alt="" src="../../assets/images/image10-1.jpg" />
+            <img class="img-b" alt="" src="../../assets/images/04-2.gif" />
           </p>
-          <p class="center">
-            <img class="img-a" alt="" src="../../assets/images/image10-2.jpg" />
-          </p>
+          <ul class="fl al-cn ju-bt img-state " style="margin-top: 100px;">
+            <li style="width: 45%;">
+              <img src="../../assets/images/05.gif" alt="" class="w100" :style="{opacity:(10 - num) / 10}">
+            </li>
+            <li style="width: 35%;">
+              <img src="../../assets/images/girl.png" alt="" class="w100" :style="{opacity: num / 10}">
+            </li>
+          </ul>
           <p class="img">鈥滅緤瑙掑紡鈥濊垶濮�</p>
         </div>
         <ul class="pb-box">
@@ -35,7 +41,7 @@
     <div class="page-box" page="10">
       <div v-if="showPageList.indexOf(10) > -1" class="pg-mh">
         <div>
-          <img src="../../assets/images/chapter-one-header.png" class="w100" />
+          <img src="../../assets/images/chapter-two-header.png" class="w100" />
         </div>
         <div class="padding-96">
           <h2 class="lefth2" id="b005">
@@ -75,7 +81,7 @@
       </div>
     </div>
     <div class="page-box" page="11">
-      <div v-if="showPageList.indexOf(10) > -1" class="pg-mh">
+      <div v-if="showPageList.indexOf(11) > -1" class="pg-mh">
         <img
           src="../../assets/images/pageContentHeader.jpg"
           alt=""
@@ -143,6 +149,7 @@
 </template>
 
 <script>
+import getResourcePath from "@/assets/methods/resources";
 export default {
   name: "chapterTwo",
   props: {
@@ -152,18 +159,57 @@
   },
   mounted() {
     this.getVidoePath();
+    this.addNum()
+  },
+  unmounted() {
+    if(this.addTimer) {
+      clearInterval(this.addTimer)
+    }
+    if(this.cutTimer) {
+      clearInterval(this.cutTimer)
+    }
   },
   data() {
     return {
       videoPathOne: "",
+      num:0,
+      addTimer:null,
+      cutTimer:null
     };
   },
   methods: {
     getVidoePath() {
       this.videoPathOne = getResourcePath("f6aaaed901868114d948031615250bed");
     },
+    addNum() {
+      this.addTimer =  setInterval(() => {
+        if(this.num < 10) {
+          this.num ++
+        } else {
+          clearInterval(this.addTimer)
+          this.cutNum()
+        }
+      },200)
+    },
+    cutNum() {
+      this.cutTimer =  setInterval(() => {
+        if(this.num > 0) {
+          this.num --
+        } else {
+          clearInterval(this.cutTimer)
+          this.addNum()
+        }
+      },200)
+    }
   },
 };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="less" scoped>
+.cover-gif {
+  position: absolute;
+  top: 33%;
+  left: 23%;
+
+}
+</style>

--
Gitblit v1.9.1