| | |
| | | } else { |
| | | this.activeBook = await this.config.getBookConfig( |
| | | // childHealth |
| | | this.config.resourceCtx + "lifeCare" |
| | | this.config.resourceCtx + "childHealth" |
| | | ); |
| | | // 测试试读30页 |
| | | // this.activeBook.tryPageCount = 10; |
| | |
| | | </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" |
| | |
| | | }; |
| | | }, |
| | | async mounted() { |
| | | this.getResourcePath = getResourcePath; |
| | | this.getVideoPath(); |
| | | const localData = localStorage.getItem("chapterOneData"); |
| | | if (localData) { |
| | |
| | | }, |
| | | saveChapterOneData() { |
| | | // 记录第一张输入数据 |
| | | console.log("20miao"); |
| | | this.saveTime = 20; |
| | | console.log(this.chapterOneData); |
| | | localStorage.setItem( |
| | | "chapterOneData", |
| | | JSON.stringify(this.chapterOneData) |
| | |
| | | }, |
| | | loadPageList: { |
| | | handler(newVal, oldVal) { |
| | | console.log(newVal, "this.loadPageList"); |
| | | setTimeout(() => { |
| | | this.initSwiper(); |
| | | this.initViewer(); |
| | |
| | | }, 500); |
| | | |
| | | // 测试页面跳转 |
| | | setTimeout(() => { |
| | | this.gotoPage(1, 11); |
| | | // setTimeout(() => { |
| | | // this.gotoPage(1, 15); |
| | | // setTimeout(() => { |
| | | // this.renderSign("Note", { |
| | | // id: "2ACA9359", |
| | |
| | | // }); |
| | | // }, 2000); |
| | | // }, 1000); |
| | | }, 1000); |
| | | // }, 1000); |
| | | }, |
| | | methods: { |
| | | // 滚动监听 |
| | |
| | | "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); |
| | | } |
| | | // 返回页码和章节信息 |
| | |
| | | const target = entry.target; |
| | | const page = target.getAttribute("page"); |
| | | if (this.loadPageList.indexOf(page) == -1) { |
| | | // |
| | | const catalogDom = this.tool.getParentNodeByClassName( |
| | | target, |
| | | "chapter" |