From c3a97e9da90ab1a34f766acd35944d295cc5a6bf Mon Sep 17 00:00:00 2001 From: unknown <qq1940665526@163.com> Date: 星期三, 05 六月 2024 13:41:00 +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