亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

翻頁時上一頁會跳一個章節,老師請解決一下

epub每個目錄不是相對于一個html嗎, 就是在一個html內翻頁上下沒問題.但是兩個html之間的,下一頁也沒問題,就是從第二個html的首頁到第一個html翻頁時(相對于上一頁),就會直接到第一個html的首頁了.請老師解答一下.謝謝老師。

vm.rendition.on('touchstart',?event?=>?{
????vm.touchStartX?=?event.changedTouches[0].clientX;
????vm.touchStartY?=?event.changedTouches[0].clientY;
????vm.touchStartTime?=?event.timeStamp;
????//?console.log(vm.touchStartTime);
????//?console.log(event);
})
vm.rendition.on('touchend',?event?=>?{
????console.log("qqq");
????console.log(event);
????var?offsetX?=?event.changedTouches[0].clientX?-?vm.touchStartX;//根據手離開屏幕和觸碰屏幕的正負判斷
????var?offsetY?=?event.changedTouches[0].clientY?-?vm.touchStartY;
????var?time?=?event.timeStamp?-?vm.touchStartTime;//根據在屏幕點擊的時間判斷是否翻頁
????if?(time?<?500?&&?offsetX?<?0?&&?Math.abs(offsetY)?<=?Math.abs(offsetX))?{
????????vm.nextPage();
????????vm.hideTitleAndMenu();
????}?else?if?(time?<?500?&&?offsetX?>?0?&&?Math.abs(offsetY)?<=?Math.abs(offsetX))?{
????????vm.prevPage();
????????vm.hideTitleAndMenu();
????}?else?{
????????//顯示上下菜單
????????vm.toggleShow();
????}
????event.preventDefault;
????event.stopPropagation();
})


prevPage:?function?()?{
????vm.rendition.prev().then(()?=>?{
????????var?currentLocation?=?vm.rendition.currentLocation();
????????var?cfi?=?currentLocation.start.cfi;
????????vm.refreshLocation(cfi);
????????var?progress?=?Math.floor(((vm.locations.percentageFromCfi(currentLocation.start.cfi)).toFixed(5))?*?10000)?/?100;
????????//?var?ppp?=?(vm.locations.percentageFromCfi(currentLocation.start.cfi)).toFixed(3);
????????vm.progress?=?progress;
????????vm.onProgressInput(progress);
????})
},
nextPage:?function?()?{
????vm.rendition.next().then(()?=>?{
????????var?currentLocation?=?vm.rendition.currentLocation();
????????var?cfi?=?currentLocation.start.cfi;
????????var?progress?=?Math.floor(((vm.locations.percentageFromCfi(currentLocation.start.cfi)).toFixed(5))?*?10000)?/?100;
????????//?console.log(progress);
????????vm.refreshLocation(cfi);
????????console.log(vm.section);
????????vm.getSectionName1();
????????vm.progress?=?progress;
????????vm.onProgressInput(progress);
????})
},


正在回答

舉報

0/150
提交
取消

翻頁時上一頁會跳一個章節,老師請解決一下

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號