闫增涛
2024-05-31 d29b8917dc2fd0a0f751480cbbf6ed8dba36d436
src/books/lifeCare/index.vue
@@ -47,6 +47,7 @@
        v-if="showCatalogList.indexOf(8) > -1"
        :showPageList="loadPageList"
        :questionData="questionData"
        @eventSwdt="swdtChange"
      />
      <chapterEight
        v-if="showCatalogList.indexOf(9) > -1"
@@ -139,7 +140,7 @@
      loadPageObserver: null,
      loadPageList: [],
      questionData: {},
      renderSignMap: {}
      renderSignMap: {},
    };
  },
  computed: {
@@ -172,21 +173,20 @@
          this.initObservation();
          this.initThemeColor();
        }, 500);
      }
      },
    },
    loadPageList: {
      handler(newVal, oldVal) {
        console.log(newVal, "this.loadPageList");
      handler() {
        setTimeout(() => {
          this.initSwiper();
          this.initViewer();
        }, 200);
      }
    }
      },
    },
  },
  mounted() {
    // 默认加载章节
    this.showCatalogList = [4];
    this.showCatalogList = [6];
    // 滚动监听节流
    this.throttledScrollHandler = _.throttle(
      this.scrollFun,
@@ -233,21 +233,21 @@
    // 测试页面跳转
    // setTimeout(() => {
      // this.gotoPage(1, 15);
      //   setTimeout(() => {
      //     this.renderSign("Note", {
      //       id: "2ACA9359",
      //       txt: "营养素和热量,才能",
      //       page: "100",
      //       type: "Highlight",
      //       color: "#F5E12A"
      //     });
      //     setTimeout(() => {
      //       this.delSign({
      //         ids: ["2ACA9359"]
      //       });
      //     }, 2000);
      //   }, 1000);
    // this.gotoPage(1, 15);
    //   setTimeout(() => {
    //     this.renderSign("Note", {
    //       id: "2ACA9359",
    //       txt: "营养素和热量,才能",
    //       page: "100",
    //       type: "Highlight",
    //       color: "#F5E12A"
    //     });
    //     setTimeout(() => {
    //       this.delSign({
    //         ids: ["2ACA9359"]
    //       });
    //     }, 2000);
    //   }, 1000);
    // }, 1000);
  },
  methods: {
@@ -306,7 +306,7 @@
          this.showCatalogList = [
            this.catalogLength - 2,
            this.catalogLength - 1,
            this.catalogLength
            this.catalogLength,
          ];
        } else {
          this.showCatalogList = [catalog - 1, catalog, catalog + 1];
@@ -554,7 +554,7 @@
            this.$store.state.qiankun.pageChange({
              page: page,
              catalog: catalog,
              text
              text,
            });
          // const sections = Array.from(document.querySelectorAll(".section"));
          //sections:获取所有具有 .section 类名的元素,并转换为数组。
@@ -626,7 +626,7 @@
          autoplay: {
            //自动开始
            delay: 3000, //时间间隔
            disableOnInteraction: false //*手动操作轮播图后不会暂停*
            disableOnInteraction: false, //*手动操作轮播图后不会暂停*
          },
          paginationClickable: true,
          slidesPerView: 1, // 一组三个
@@ -634,7 +634,7 @@
          // 如果需要前进后退按钮
          navigation: {
            nextEl: ".swiper-button-next",
            prevEl: ".swiper-button-prev"
            prevEl: ".swiper-button-prev",
          },
          // 窗口变化,重新init,针对F11全屏和放大缩小,必须加
          observer: true,
@@ -656,7 +656,7 @@
        new Viewer(dom, {
          navbar: true, // 显示导航栏
          toolbar: true, // 显示工具栏
          title: true // 显示标题
          title: true, // 显示标题
        });
      }
    },
@@ -711,6 +711,13 @@
        }
      }
    },
    swdtChange(data) {
      if (this.$store.state.qiankun && this.$store.state.qiankun.chooseWords) {
        this.$store.state.qiankun.chooseWords({
          type: data,
        });
      }
    },
  },
  components: {
    front001,