From 9a3baab049df4a32a7b724c5f24cecdbc3e469b6 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期四, 05 六月 2025 09:37:25 +0800 Subject: [PATCH] 图片名字更新 --- src/books/aviationEtiquette/view/components/index.vue | 98 +++++++++++++++++++++++++------------------------ 1 files changed, 50 insertions(+), 48 deletions(-) diff --git a/src/books/aviationEtiquette/view/components/index.vue b/src/books/aviationEtiquette/view/components/index.vue index fa88e34..4393dea 100644 --- a/src/books/aviationEtiquette/view/components/index.vue +++ b/src/books/aviationEtiquette/view/components/index.vue @@ -9,16 +9,17 @@ transformOrigin: 'center top', }"> <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader> - <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"></chapterOne> - <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"></chapterTwo> - <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"></chapterThree> - <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList"></chapterFour> - <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList"> </chapterFive> + <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" :interfaceQuestion="questionDataMap"></chapterOne> + <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" :interfaceQuestion="questionDataMap"></chapterTwo> + <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" :interfaceQuestion="questionDataMap"></chapterThree> + <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" :interfaceQuestion="questionDataMap"></chapterFour> + <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList" :interfaceQuestion="questionDataMap"> </chapterFive> </div> </div> </template> <script> +import Vue from "vue"; import pageHeader from "./header.vue"; import chapterOne from "./chapter001.vue"; import chapterTwo from "./chpater002.vue"; @@ -26,6 +27,8 @@ import chapterFour from "./chapter004.vue"; import chapterFive from "./chapter005.vue"; import NoteIcon from "@/assets/images/biji.png"; +import getQuestionList from "@/assets/methods/examination"; +import testData from "../../assets/examinationList"; import _ from "lodash"; import Swiper from "swiper/bundle"; import "swiper/swiper-bundle.css"; @@ -157,23 +160,10 @@ this.initThemeColor(); }, 500); - // 娴嬭瘯椤甸潰璺宠浆 - // setTimeout(() => { - // this.gotoPage(2, 6); - // setTimeout(() => { - // this.renderSign("Highlight", { - // id: "2ACA9359", - // txt: "棰樹竴瀛︿範涓婚涓� 杩愬姩", - // page: "10", - // type: "Highlight", - // color: "#F5E12A" - // }); - // setTimeout(() => { - // this.delSign({ - // ids: ["2ACA9359"] - // }); - // }, 2000); - // }, 500); + //娴嬭瘯椤甸潰璺宠浆 + setTimeout(() => { + this.gotoPage(3, 64); + }, 500); // const pageDom = (this.container ? this.container : document) // .querySelector("#app") @@ -543,30 +533,30 @@ // 娣诲姞椤电爜 this.loadPageList.push(Number(page)); const catalog = catalogDom.getAttribute("num"); - // if (!this.questionDataMap[page]) { - // if (testData && testData[catalog]) { - // if (testData[catalog][page]) { - // if (Array.isArray(testData[catalog][page])) { - // this.questionDataMap[page] = await getQuestionList( - // page, - // testData[catalog][page], - // this.config.activeBook - // ); - // } else { - // const obj = {}; - // for (let key in testData[catalog][page]) { - // obj[key] = await getQuestionList( - // [], - // testData[catalog][page][key], - // this.config.activeBook - // ); - // } - // this.questionDataMap[page] = obj; - // } - // console.log("棰樼洰", this.questionDataMap); - // } - // } - // } + if (!this.questionDataMap[page]) { + if (testData && testData[catalog]) { + if (testData[catalog][page]) { + if (Array.isArray(testData[catalog][page])) { + this.questionDataMap[page] = await getQuestionList( + page, + testData[catalog][page], + this.config.activeBook + ); + } else { + const obj = {}; + for (let key in testData[catalog][page]) { + obj[key] = await getQuestionList( + [], + testData[catalog][page][key], + this.config.activeBook + ); + } + this.questionDataMap[page] = obj; + } + console.log("棰樼洰", this.questionDataMap); + } + } + } // 娓叉煋杩欎竴椤电殑鏍囪 for (const key in this.renderSignMap) { if (this.renderSignMap[key][page]) { @@ -707,6 +697,7 @@ searchTextByPage(keyword) { const searchResult = []; let catalogIndex = 0; + console.log(keyword,"keyword") // 鎵�鏈夌珷鑺傜粍浠讹紙姣忔湰涔﹀埗浣滄椂鍗曠嫭閰嶇疆锛� const pageData = { pageHeader, @@ -716,6 +707,7 @@ chapterFour, chapterFive }; + // 閬嶅巻鎵�鏈夌珷鑺傛枃浠� for (const key in pageData) { catalogIndex++; @@ -734,11 +726,13 @@ "#searchContent" ) ); - // 鑾峰彇椤电爜 + // 鑾峰彇椤电爜 + const pageDom = (this.container ? this.container : document) .querySelector("#searchDomBox") .querySelectorAll(".page-box"); const pages = []; + for (let i = 0; i < pageDom.length; i++) { const pageDomItem = pageDom[i]; pages.push(Number(pageDomItem.getAttribute("page"))); @@ -917,7 +911,15 @@ const bottomGap = playVudio.getBoundingClientRect().bottom; const topGap = playVudio.getBoundingClientRect().top; if (bottomGap < 0 || topGap > window.innerHeight) { - playVudio.requestPictureInPicture(); + try { + if (playVudio.readyState){ + setTimeout(()=>{ + playVudio.requestPictureInPicture(); + },0) + } + } catch (error) { + console.log(error, "灏忕獥閿欒error"); + } } } }, -- Gitblit v1.9.1