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/chapter003.vue |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/books/childHealth/view/content/components/chapter003.vue b/src/books/childHealth/view/content/components/chapter003.vue
index d2a1095..b71fd35 100644
--- a/src/books/childHealth/view/content/components/chapter003.vue
+++ b/src/books/childHealth/view/content/components/chapter003.vue
@@ -1950,6 +1950,10 @@
     },
     showPageList:{
       type:Array
+    },
+    isSearch:{
+      type:Boolean,
+      default:false
     }
   },
   data() {
@@ -2056,7 +2060,8 @@
     };
   },
   async mounted() {
-    const localData = localStorage.getItem("chapterThreeData");
+    if(!this.isSearch) {
+      const localData = localStorage.getItem("chapterThreeData");
     if (localData) {
       this.chapterThreeData = JSON.parse(localData);
     }
@@ -2067,6 +2072,8 @@
       }
     }, 1000);
     this.getVideoPath()
+    }
+
   },
   unmounted() {
     if (window.timerThree) {
@@ -2086,15 +2093,15 @@
         this.$data.videoState = !this.$data.videoState;
       }
     },
-    getVideoPath() {
-      this.$data.pathOne = getResourcePath("ca2a1ae9429a5f7a28fe9aa1bfbf3b4a");
-      this.$data.pathTwo = getResourcePath("8fa9d6565b97c5975b1a0a7ef09d38a9");
-      this.$data.pathThree = getResourcePath(
+    async getVideoPath() {
+      this.$data.pathOne = await getResourcePath("ca2a1ae9429a5f7a28fe9aa1bfbf3b4a");
+      this.$data.pathTwo = await getResourcePath("8fa9d6565b97c5975b1a0a7ef09d38a9");
+      this.$data.pathThree = await getResourcePath(
         "56170fb1a0ea272990fe51530086aab1"
       );
-      this.$data.pathFour = getResourcePath("ae67fd7678656c0ce89599bd1949f993");
-      this.$data.pathFive = getResourcePath("5aa431a223cdba0d30f1175a2ec3f308");
-      this.$data.pathSix = getResourcePath("bc3af85cd899b20adf885c308c595fbb");
+      this.$data.pathFour = await getResourcePath("ae67fd7678656c0ce89599bd1949f993");
+      this.$data.pathFive = await getResourcePath("5aa431a223cdba0d30f1175a2ec3f308");
+      this.$data.pathSix = await getResourcePath("bc3af85cd899b20adf885c308c595fbb");
     },
     saveChapterOneData() {
       this.saveTime = 20;

--
Gitblit v1.9.1