闫增涛
2024-11-19 28ae9e323d8ce3eff8a02860d0527fb89e5ea530
src/books/civilAviationServices/view/components/index.vue
@@ -9,14 +9,20 @@
        transformOrigin: 'center top',
      }">
        <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader>
        <!-- <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"></chapterOne> -->
        <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>
  
  <script>
  import pageHeader from "./header.vue";
//   import chapterOne from "./chapter001.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: 1, // 总章节数
        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",
@@ -705,7 +711,10 @@
        // 所有章节组件(每本书制作时单独配置)
        const pageData = {
          pageHeader,
        //   chapterOne,
          chapterOne,
          chapterTwo,
          chapterThree,
          chapterFour,
        };
        // 遍历所有章节文件
        for (const key in pageData) {
@@ -908,13 +917,12 @@
          const bottomGap = playVudio.getBoundingClientRect().bottom;
          const topGap = playVudio.getBoundingClientRect().top;
          if (bottomGap < 0 || topGap > window.innerHeight) {
            playVudio.requestPictureInPicture();
            if(playVudio.readyState) playVudio.requestPictureInPicture();
          }
        }
      },
      //其他类名下字体大小变化
      transformDom(fs) {
        console.log('字体大小',fs);
        if(!fs) return
        let doms = (
          this.container ? this.container : document
@@ -928,7 +936,10 @@
    },
    components: {
      pageHeader,
    //   chapterOne,
      chapterOne,
      chapterTwo,
      chapterThree,
      chapterFour,
    },
  };
  </script>