From 7944d624d5adf492a4a5ead068b2a88c707e2388 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 07 六月 2024 10:49:55 +0800 Subject: [PATCH] 学前儿童保存优化 --- src/books/childHealth/view/content/components/chapter005.vue | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/src/books/childHealth/view/content/components/chapter005.vue b/src/books/childHealth/view/content/components/chapter005.vue index 8282584..690fcda 100644 --- a/src/books/childHealth/view/content/components/chapter005.vue +++ b/src/books/childHealth/view/content/components/chapter005.vue @@ -2841,22 +2841,7 @@ if (localData) { this.chapterFiveData = JSON.parse(localData); } - window.timerFive = setInterval(() => { - this.saveTime--; - if (this.saveTime == 0) { - this.saveChapterOneData(); - } - }, 1000); this.getVideoPath(); - }, - unmounted() { - if (window.timerFive) { - clearInterval(window.timerFive); - } - localStorage.setItem( - "chapterFiveData", - JSON.stringify(this.chapterFiveData) - ); }, methods: { changeResources(type) { @@ -2873,7 +2858,6 @@ } }, saveChapterOneData() { - this.saveTime = 20; localStorage.setItem( "chapterFiveData", JSON.stringify(this.chapterFiveData) -- Gitblit v1.9.1