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/chapter002.vue | 46 +++++++++++++++++++++------------------------- 1 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/books/childHealth/view/content/components/chapter002.vue b/src/books/childHealth/view/content/components/chapter002.vue index e8f256c..49a8582 100644 --- a/src/books/childHealth/view/content/components/chapter002.vue +++ b/src/books/childHealth/view/content/components/chapter002.vue @@ -43,12 +43,8 @@ /> 涓撻瀵煎 </h6> - <p class="blockh6 m0-t0"> - <el-image - :src="special" - :preview-src-list="[special]" - class="open-image" - /> + <p class="blockh6 m0-t0 openImgBox"> + <img src="../../../assets/images/chapterTwo/0056-1.jpg" alt="" class="w100 mt-40"> </p> </div> </div> @@ -373,7 +369,7 @@ </h6> <p class="blockh6-c"> <span class="img center dl-bl w100">涓撻浜� 瀛︿範涓婚涓�</span> - <examinations v-if="questionData" :cardList="questionData[54]" /> + <examinations v-if="questionData && questionData[54]" :cardList="questionData[54]" /> </p> <h2 class="module_block" id="b011"> <div class="custom1">瀛︿範涓婚浜�</div> @@ -668,12 +664,8 @@ <p>鑴戙�佽剨楂撲互鍙婄溂鐞冪瓑鍣ㄥ畼锛屽彲浠ョ撼鍏ヨ绫荤敓闀垮彂鑲�</p> </div> <div class="right" style="width: 35%"> - <p class="center"> - <el-image - :src="most" - :preview-src-list="[most]" - class="open-image" - /> + <p class="center openImgBox"> + <img src="../../../assets/images/chapterTwo/0060-1.jpg" alt="" class="w100"> </p> <p class="img">鍥�2-1 韬綋鍣ㄥ畼鎴栫郴缁熺殑鍥涚鐢熼暱鍙戣偛妯″紡</p> </div> @@ -765,7 +757,7 @@ <p class="blockh6-c"> <!-- <img class="img-g" alt="" src="image/0062-1.jpg" /><br /> --> <span class="img center dl-bl w100">涓撻浜� 瀛︿範涓婚浜�</span> - <examinations v-if="questionData" :cardList="questionData[57]" /> + <examinations v-if="questionData && questionData[57]" :cardList="questionData[57]" /> </p> <p class="custom_tag"><b>鈥㈣祫鏂欓摼鎺モ��</b></p> <div class="fieldset"> @@ -1133,7 +1125,7 @@ <!-- <img class="img-g" alt="" src="image/0065-1.jpg" /><br /> --> <span class="img center dl-bl w100">涓撻浜� 瀛︿範涓婚涓�</span> <examinations - v-if="questionData" + v-if="questionData && questionData[60]" :cardList="questionData[60]" :chapter="2" :page="52" @@ -1310,10 +1302,10 @@ <p class="blockh6-c"> 瀛︿範瀹屾湰涓撻锛屼綘鐨勫涔犳晥鏋滃浣曞憿锛熷挶浠竴璧锋潵鎵爜娴嬩竴娴嬪惂锛�<br /> <span class="img">杩囧叧妫�娴嬶紙璧勬牸鑰冭瘯妯℃嫙棰橈級1</span><br /> - <examinations v-if="questionData" :cardList="questionData[62][1]" /> + <examinations v-if="questionData && questionData[62][1]" :cardList="questionData[62][1]" /> <span class="span-border"></span> <span class="img mt-20 dl-bl">杩囧叧妫�娴嬶紙璧勬牸鑰冭瘯妯℃嫙棰橈級2</span> - <examinations v-if="questionData" :cardList="questionData[62][2]" /> + <examinations v-if="questionData && questionData[62][2]" :cardList="questionData[62][2]" /> </p> <h6 class="Conclusion-title4">鈥㈠涔犲弽鎬濃��</h6> <p class="blockh6 m0-t0 fl fl-di fl-cn"> @@ -1334,7 +1326,7 @@ <script> import examinations from "@/components/examinations/index.vue"; -import getResourcePath from "@/assets/methods/resources"; +import {getResourcePath} from "@/assets/methods/resources"; export default { name: "chapterTwo", components: { examinations }, @@ -1344,12 +1336,14 @@ }, showPageList:{ type:Array + }, + isSearch:{ + type:Boolean, + default:false } }, data() { return { - special: require("../../../assets/images/chapterTwo/0056-1.jpg"), - most: require("../../../assets/images/chapterTwo/0060-1.jpg"), resourceState: "", videoState: true, learnTableOne: true, @@ -1436,7 +1430,8 @@ }; }, async mounted() { - const localData = localStorage.getItem("chapterTwoData"); + if(!this.isSearch) { + const localData = localStorage.getItem("chapterTwoData"); if (localData) { this.chapterTwoData = JSON.parse(localData); } @@ -1447,6 +1442,7 @@ } }, 1000); this.getVideoPath(); + } }, unmounted() { if (window.timerTwo) { @@ -1467,10 +1463,10 @@ this.$data.videoState = !this.$data.videoState; } }, - getVideoPath() { - this.$data.pathOne = getResourcePath("e2b2b610e8b77c82bad7cf94c7986646"); - this.$data.pathTwo = getResourcePath("b11b51863da2a4e7e21c73358fa96c1e"); - this.$data.pathThree = getResourcePath( + async getVideoPath() { + this.$data.pathOne = await getResourcePath("e2b2b610e8b77c82bad7cf94c7986646"); + this.$data.pathTwo = await getResourcePath("b11b51863da2a4e7e21c73358fa96c1e"); + this.$data.pathThree = await getResourcePath( "67cf97bd8295dc3aeb46982c574df8d0" ); }, -- Gitblit v1.9.1