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/chapter009.vue |   42 ++++++++++++++++++++++++------------------
 1 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/src/books/childHealth/view/content/components/chapter009.vue b/src/books/childHealth/view/content/components/chapter009.vue
index 9e9c222..29af446 100644
--- a/src/books/childHealth/view/content/components/chapter009.vue
+++ b/src/books/childHealth/view/content/components/chapter009.vue
@@ -1746,6 +1746,10 @@
     showPageList: {
       type: Array,
     },
+    isSearch: {
+      type: Boolean,
+      default: false,
+    },
   },
   data() {
     return {
@@ -1830,17 +1834,19 @@
     };
   },
   async mounted() {
-    const localData = localStorage.getItem("chapterNineData");
-    if (localData) {
-      this.chapterNineData = JSON.parse(localData);
-    }
-    window.timerNine = setInterval(() => {
-      this.saveTime--;
-      if (this.saveTime == 0) {
-        this.saveChapterOneData();
+    if(!this.isSearch) {
+      const localData = localStorage.getItem("chapterNineData");
+      if (localData) {
+        this.chapterNineData = JSON.parse(localData);
       }
-    }, 1000);
-    this.getVideoPath();
+      window.timerNine = setInterval(() => {
+        this.saveTime--;
+        if (this.saveTime == 0) {
+          this.saveChapterOneData();
+        }
+      }, 1000);
+      this.getVideoPath();
+    }
   },
   unmounted() {
     if (window.timerNine) {
@@ -1872,16 +1878,16 @@
         this.$data.learnTableFive = !this.$data.learnTableFive;
       }
     },
-    getVideoPath() {
-      this.$data.pathOne = getResourcePath("730ab5395d1b5b5c87d7422cc6540f35");
-      this.$data.pathTwo = getResourcePath("e3c6884dc80cf947e3a38c5595d474ad");
-      this.$data.pathThree = getResourcePath(
+    async getVideoPath() {
+      this.$data.pathOne = await getResourcePath("730ab5395d1b5b5c87d7422cc6540f35");
+      this.$data.pathTwo = await getResourcePath("e3c6884dc80cf947e3a38c5595d474ad");
+      this.$data.pathThree = await getResourcePath(
         "bdaec679118721e0623d62ac3031288e"
       );
-      this.$data.pathFour = getResourcePath("c61f14623b01adaa326d18f2a19b822b");
-      this.$data.pathFive = getResourcePath("c469389f516c81f13e4d0440bd9ec87e");
-      this.$data.pathSix = getResourcePath("f8d747892eb8af7ed16bcb71967d414f");
-      this.$data.pathSeven = getResourcePath(
+      this.$data.pathFour = await getResourcePath("c61f14623b01adaa326d18f2a19b822b");
+      this.$data.pathFive = await getResourcePath("c469389f516c81f13e4d0440bd9ec87e");
+      this.$data.pathSix = await getResourcePath("f8d747892eb8af7ed16bcb71967d414f");
+      this.$data.pathSeven = await getResourcePath(
         "960e9aa17b48e900b08cde6e44b774f3"
       );
     },

--
Gitblit v1.9.1