zhongshujie
2024-12-27 f95d8436affff7d9c48281be520b2c5f271ac879
src/books/aviationSafety/view/components/index.vue
@@ -16,6 +16,7 @@
        <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList"></chapterFive> 
        <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList"></chapterSix>
        <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList"></chapterSeven>
        <chapterEight v-if="showCatalogList.indexOf(9) > -1" :showPageList="loadPageList"></chapterEight>
      </div>
    </div>
  </template>
@@ -29,6 +30,7 @@
  import chapterFive from "./chapter005.vue";
  import chapterSix from "./chapter006.vue";
  import chapterSeven from "./chapter007.vue";
  import chapterEight from "./chapter008.vue";
  import NoteIcon from "@/assets/images/biji.png";
  import _ from "lodash";
  import Swiper from "swiper/bundle";
@@ -39,7 +41,7 @@
    name: "pageContent",
    data() {
      return {
        catalogLength: 8, // 总章节数
        catalogLength: 9, // 总章节数
        showCatalogList: [], // 显示的章节
        loadThreshold: 300, // 触发加载阈值
        throttleThreshold: 100, // 节流阈值
@@ -108,7 +110,7 @@
      // 默认加载章节
      this.showCatalogList = [1];
      // 滚动监听节流
      debugger
      // debugger
      this.throttledScrollHandler = _.throttle(
        this.scrollFun,
        this.throttleThreshold,
@@ -164,7 +166,7 @@
  
      // 测试页面跳转
      setTimeout(() => {
        this.gotoPage(8,127);
        this.gotoPage(9,130);
      //   setTimeout(() => {
      //     this.renderSign("Highlight", {
      //       id: "2ACA9359",
@@ -224,7 +226,7 @@
          ) {
            console.log(1);
  
            debugger
            // debugger
            // 到达阈值
            if (
              this.showCatalogList[this.showCatalogList.length - 1] <
@@ -724,6 +726,7 @@
          chapterFive,
          chapterSix,
          chapterSeven,
          chapterEight
        };
        // 遍历所有章节文件
        for (const key in pageData) {
@@ -952,6 +955,7 @@
      chapterFive,
      chapterSix,
      chapterSeven,
      chapterEight
    },
  };
  </script>