闫增涛
2024-05-29 1dee69cf56598b674fafc310be1ea06b8fa1d8a3
Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout
3个文件已修改
43 ■■■■ 已修改文件
src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/childHealth/view/content/components/chapter001.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/childHealth/view/content/index.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -58,7 +58,7 @@
    } else {
      this.activeBook = await this.config.getBookConfig(
        // childHealth
        this.config.resourceCtx + "embedded"
        this.config.resourceCtx + "childHealth"
      );
      // 测试试读30页
      // this.activeBook.tryPageCount = 10;
src/books/childHealth/view/content/components/chapter001.vue
@@ -1029,7 +1029,7 @@
            </div>
            <div class="right" style="width: 60%">
              <video
                :src="pathFive"
                :src="getResourcePath('163c06871b763954952d1cd74373c618')"
                poster="../../../assets/images/chapterOne/people-video-img.jpg"
                webkit-playsinline="true"
                x-webkit-airplay="true"
@@ -4854,6 +4854,7 @@
    };
  },
  async mounted() {
    this.getResourcePath = getResourcePath;
    this.getVideoPath();
    const localData = localStorage.getItem("chapterOneData");
    if (localData) {
@@ -4924,9 +4925,7 @@
    },
    saveChapterOneData() {
      // 记录第一张输入数据
      console.log("20miao");
      this.saveTime = 20;
      console.log(this.chapterOneData);
      localStorage.setItem(
        "chapterOneData",
        JSON.stringify(this.chapterOneData)
src/books/childHealth/view/content/index.vue
@@ -146,6 +146,7 @@
    },
    loadPageList: {
      handler(newVal, oldVal) {
        console.log(newVal, "this.loadPageList");
        setTimeout(() => {
          this.initSwiper();
          this.initViewer();
@@ -202,21 +203,21 @@
    // 测试页面跳转
    // setTimeout(() => {
    //   this.gotoPage(1, 11);
    //   //   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: {
@@ -374,7 +375,7 @@
            return false;
          }
        }
        //observer 观察每个元素,以便在它们进入或离开视窗时触发回调函数。
        // observer 观察每个元素,以便在它们进入或离开视窗时触发回调函数。
        const isObserver = section.getAttribute("observer");
        const isLoadObserver = section.getAttribute("loadObserver");
        if (!isObserver) {
@@ -487,10 +488,8 @@
            "chapter"
          );
          const catalog = catalogDom.getAttribute("num");
          console.log(page, "page", catalog, "catalog");
          let text = null;
          if (target.querySelector("p")) {
            console.log(target.querySelector("p").textContent.substring(0, 20));
            text = target.querySelector("p").textContent.substring(0, 20);
          }
          // 返回页码和章节信息
@@ -513,7 +512,6 @@
          const target = entry.target;
          const page = target.getAttribute("page");
          if (this.loadPageList.indexOf(page) == -1) {
            //
            const catalogDom = this.tool.getParentNodeByClassName(
              target,
              "chapter"