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/chapter009.vue | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/books/childHealth/view/content/components/chapter009.vue b/src/books/childHealth/view/content/components/chapter009.vue index aa3beca..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) { -- Gitblit v1.9.1