From 57ebfaedfe6364ab0c3beb1afe01c00fe2798a2c Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 06 六月 2024 10:28:54 +0800
Subject: [PATCH] 嵌入式优化

---
 src/books/childHealth/view/content/components/chapter002.vue |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/books/childHealth/view/content/components/chapter002.vue b/src/books/childHealth/view/content/components/chapter002.vue
index 005ea10..49a8582 100644
--- a/src/books/childHealth/view/content/components/chapter002.vue
+++ b/src/books/childHealth/view/content/components/chapter002.vue
@@ -1336,6 +1336,10 @@
     },
     showPageList:{
       type:Array
+    },
+    isSearch:{
+      type:Boolean,
+      default:false
     }
   },
   data() {
@@ -1426,7 +1430,8 @@
     };
   },
   async mounted() {
-    const localData = localStorage.getItem("chapterTwoData");
+    if(!this.isSearch) {
+      const localData = localStorage.getItem("chapterTwoData");
     if (localData) {
       this.chapterTwoData = JSON.parse(localData);
     }
@@ -1437,6 +1442,7 @@
       }
     }, 1000);
     this.getVideoPath();
+    }
   },
   unmounted() {
     if (window.timerTwo) {
@@ -1457,10 +1463,10 @@
         this.$data.videoState = !this.$data.videoState;
       }
     },
-    getVideoPath() {
-      this.$data.pathOne = getResourcePath("e2b2b610e8b77c82bad7cf94c7986646");
-      this.$data.pathTwo = getResourcePath("b11b51863da2a4e7e21c73358fa96c1e");
-      this.$data.pathThree = getResourcePath(
+    async getVideoPath() {
+      this.$data.pathOne = await getResourcePath("e2b2b610e8b77c82bad7cf94c7986646");
+      this.$data.pathTwo = await getResourcePath("b11b51863da2a4e7e21c73358fa96c1e");
+      this.$data.pathThree = await getResourcePath(
         "67cf97bd8295dc3aeb46982c574df8d0"
       );
     },

--
Gitblit v1.9.1