闫增涛
2024-11-19 28ae9e323d8ce3eff8a02860d0527fb89e5ea530
src/books/civilAviationServices/view/components/index.vue
@@ -10,6 +10,9 @@
      }">
        <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>
      </div>
    </div>
  </template>
@@ -17,6 +20,9 @@
  <script>
  import pageHeader from "./header.vue";
  import chapterOne from "./chapter001.vue";
  import chapterTwo from "./chpater002.vue";
  import chapterThree from "./chapter003.vue";
  import chapterFour from "./chapter004.vue";
  import NoteIcon from "@/assets/images/biji.png";
  import _ from "lodash";
  import Swiper from "swiper/bundle";
@@ -27,7 +33,7 @@
    name: "pageContent",
    data() {
      return {
        catalogLength: 2, // 总章节数
        catalogLength: 5, // 总章节数
        showCatalogList: [], // 显示的章节
        loadThreshold: 300, // 触发加载阈值
        throttleThreshold: 100, // 节流阈值
@@ -152,7 +158,7 @@
  
      // 测试页面跳转
      // setTimeout(() => {
      //   this.gotoPage(6, 30);
      //   this.gotoPage(3, 92);
      //   setTimeout(() => {
      //     this.renderSign("Highlight", {
      //       id: "2ACA9359",
@@ -706,6 +712,9 @@
        const pageData = {
          pageHeader,
          chapterOne,
          chapterTwo,
          chapterThree,
          chapterFour,
        };
        // 遍历所有章节文件
        for (const key in pageData) {
@@ -908,7 +917,7 @@
          const bottomGap = playVudio.getBoundingClientRect().bottom;
          const topGap = playVudio.getBoundingClientRect().top;
          if (bottomGap < 0 || topGap > window.innerHeight) {
            playVudio.requestPictureInPicture();
            if(playVudio.readyState) playVudio.requestPictureInPicture();
          }
        }
      },
@@ -928,6 +937,9 @@
    components: {
      pageHeader,
      chapterOne,
      chapterTwo,
      chapterThree,
      chapterFour,
    },
  };
  </script>