| | |
| | | transformOrigin: 'center top', |
| | | }"> |
| | | <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader> |
| | | <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> |
| | | <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"; |
| | |
| | | |
| | | //测试页面跳转 |
| | | // setTimeout(() => { |
| | | // this.gotoPage(2, 18); |
| | | // setTimeout(() => { |
| | | // this.renderSign("Highlight", { |
| | | // id: "2ACA9359", |
| | | // txt: "题一学习主题一 运动", |
| | | // page: "10", |
| | | // type: "Highlight", |
| | | // color: "#F5E12A" |
| | | // }); |
| | | // setTimeout(() => { |
| | | // this.delSign({ |
| | | // ids: ["2ACA9359"] |
| | | // }); |
| | | // }, 2000); |
| | | // this.gotoPage(4, 99); |
| | | // }, 500); |
| | | |
| | | // const pageDom = (this.container ? this.container : document) |
| | |
| | | searchTextByPage(keyword) { |
| | | const searchResult = []; |
| | | let catalogIndex = 0; |
| | | console.log(keyword, "keyword") |
| | | // 所有章节组件(每本书制作时单独配置) |
| | | const pageData = { |
| | | pageHeader, |
| | |
| | | chapterFour, |
| | | chapterFive |
| | | }; |
| | | |
| | | // 遍历所有章节文件 |
| | | for (const key in pageData) { |
| | | catalogIndex++; |
| | |
| | | "#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"))); |
| | |
| | | const topGap = playVudio.getBoundingClientRect().top; |
| | | if (bottomGap < 0 || topGap > window.innerHeight) { |
| | | try { |
| | | if (playVudio.readyState){ |
| | | setTimeout(()=>{ |
| | | if (playVudio.readyState) { |
| | | setTimeout(() => { |
| | | playVudio.requestPictureInPicture(); |
| | | },0) |
| | | } |
| | | }, 0) |
| | | } |
| | | } catch (error) { |
| | | console.log(error, "小窗错误error"); |
| | | } |