From 1c389a5a5c22c8d57ee79cc9ac8ed6db6c8dbadc Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 04 六月 2024 18:01:59 +0800
Subject: [PATCH] 搜素优化

---
 src/books/childHealth/view/content/components/chapter010.vue |   32 +++++++++++++++++++-------------
 1 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/books/childHealth/view/content/components/chapter010.vue b/src/books/childHealth/view/content/components/chapter010.vue
index 06ed268..64cc7d2 100644
--- a/src/books/childHealth/view/content/components/chapter010.vue
+++ b/src/books/childHealth/view/content/components/chapter010.vue
@@ -1364,6 +1364,10 @@
     showPageList: {
       type: Array,
     },
+    isSearch: {
+      type: Boolean,
+      default: false,
+    },
   },
   data() {
     return {
@@ -1426,17 +1430,19 @@
     };
   },
   async mounted() {
-    const localData = localStorage.getItem("chapterTenData");
-    if (localData) {
-      this.chapterTenData = JSON.parse(localData);
-    }
-    window.timerTen = setInterval(() => {
-      this.saveTime--;
-      if (this.saveTime == 0) {
-        this.saveChapterOneData();
+    if(!this.isSearch) {
+      const localData = localStorage.getItem("chapterTenData");
+      if (localData) {
+        this.chapterTenData = JSON.parse(localData);
       }
-    }, 1000);
-    this.getVideoPath();
+      window.timerTen = setInterval(() => {
+        this.saveTime--;
+        if (this.saveTime == 0) {
+          this.saveChapterOneData();
+        }
+      }, 1000);
+      this.getVideoPath();
+    }
   },
   unmounted() {
     if (window.timerTen) {
@@ -1465,9 +1471,9 @@
         JSON.stringify(this.chapterTenData)
       );
     },
-    getVideoPath() {
-      this.$data.pathOne = getResourcePath("3f507f73eb9d8c2af4dfcfb032ae696e");
-      this.$data.pathTwo = getResourcePath("93d4edcc8ef4f947ebfb0cee38ccaa71");
+   async getVideoPath() {
+      this.$data.pathOne = await getResourcePath("3f507f73eb9d8c2af4dfcfb032ae696e");
+      this.$data.pathTwo = await getResourcePath("93d4edcc8ef4f947ebfb0cee38ccaa71");
     },
   },
 };

--
Gitblit v1.9.1