zhongshujie
3 天以前 1695fcd442fe2cefb6d3b63869ad8a72ebd5210a
src/books/aviationEtiquette/view/components/index.vue
@@ -9,11 +9,16 @@
      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>
@@ -162,7 +167,7 @@
    //测试页面跳转
    // setTimeout(() => {
    //   this.gotoPage(3, 64);
    //   this.gotoPage(4, 99);
    // }, 500);
    // const pageDom = (this.container ? this.container : document)
@@ -697,7 +702,7 @@
    searchTextByPage(keyword) {
      const searchResult = [];
      let catalogIndex = 0;
      console.log(keyword,"keyword")
      console.log(keyword, "keyword")
      // 所有章节组件(每本书制作时单独配置)
      const pageData = {
        pageHeader,
@@ -707,7 +712,7 @@
        chapterFour,
        chapterFive
      };
      // 遍历所有章节文件
      for (const key in pageData) {
        catalogIndex++;
@@ -727,12 +732,12 @@
          )
        );
        // 获取页码 
        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")));
@@ -912,11 +917,11 @@
        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");
          }