From cf6e9bcbfc64019bb14fb0964576ae3e3bd2fde5 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 26 三月 2025 11:22:20 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout --- src/books/aviationEtiquette/view/components/index.vue | 72 +++++++++++++++++++---------------- 1 files changed, 39 insertions(+), 33 deletions(-) diff --git a/src/books/aviationEtiquette/view/components/index.vue b/src/books/aviationEtiquette/view/components/index.vue index 41631e7..2d8d9eb 100644 --- a/src/books/aviationEtiquette/view/components/index.vue +++ b/src/books/aviationEtiquette/view/components/index.vue @@ -9,11 +9,11 @@ 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> @@ -26,6 +26,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,9 +159,9 @@ this.initThemeColor(); }, 500); - // 娴嬭瘯椤甸潰璺宠浆 + //娴嬭瘯椤甸潰璺宠浆 // setTimeout(() => { - // this.gotoPage(2, 9); + // this.gotoPage(5, 130); // setTimeout(() => { // this.renderSign("Highlight", { // id: "2ACA9359", @@ -543,30 +545,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]) { @@ -918,9 +920,13 @@ const topGap = playVudio.getBoundingClientRect().top; if (bottomGap < 0 || topGap > window.innerHeight) { try { - if(playVudio.readyState) playVudio.requestPictureInPicture(); + if (playVudio.readyState){ + setTimeout(()=>{ + playVudio.requestPictureInPicture(); + },0) + } } catch (error) { - console.log(error,"灏忕獥閿欒error"); + console.log(error, "灏忕獥閿欒error"); } } } -- Gitblit v1.9.1