zhongshujie
3 天以前 1695fcd442fe2cefb6d3b63869ad8a72ebd5210a
src/books/aviationEtiquette/view/components/index.vue
@@ -9,16 +9,22 @@
      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";
@@ -160,22 +166,9 @@
    }, 500);
    //测试页面跳转
    setTimeout(() => {
      this.gotoPage(6, 169);
      //   setTimeout(() => {
      //     this.renderSign("Highlight", {
      //       id: "2ACA9359",
      //       txt: "题一学习主题一 运动",
      //       page: "10",
      //       type: "Highlight",
      //       color: "#F5E12A"
      //     });
      // setTimeout(() => {
      //   this.delSign({
      //     ids: ["2ACA9359"]
      //   });
      // }, 2000);
    }, 500);
    // setTimeout(() => {
    //   this.gotoPage(4, 99);
    // }, 500);
    // const pageDom = (this.container ? this.container : document)
    //   .querySelector("#app")
@@ -709,6 +702,7 @@
    searchTextByPage(keyword) {
      const searchResult = [];
      let catalogIndex = 0;
      console.log(keyword, "keyword")
      // 所有章节组件(每本书制作时单独配置)
      const pageData = {
        pageHeader,
@@ -718,6 +712,7 @@
        chapterFour,
        chapterFive
      };
      // 遍历所有章节文件
      for (const key in pageData) {
        catalogIndex++;
@@ -736,11 +731,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")));
@@ -920,7 +917,11 @@
        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");
          }