| | |
| | | }, |
| | | |
| | | setWebViewSrc: function (data) { |
| | | var url = app.config.epubUrl + |
| | | "?md5=" + |
| | | data.md5 + |
| | | "&bookName=" + |
| | | data.fileName + |
| | | "&url=" + app.config.requestCtx + |
| | | "&token=" + |
| | | wx.getStorageSync(app.config.tokenKey) + |
| | | "&recordLocation=" + |
| | | this.data.currentPage |
| | | var url = ""; |
| | | if (data.fileType == 'epub') { |
| | | if (data.bookBuy) { |
| | | url = app.config.epubUrl + |
| | | "?md5=" + |
| | | data.md5 + |
| | | "&bookName=" + |
| | | data.fileName + |
| | | "&url=" + app.config.requestCtx + |
| | | "&token=" + |
| | | wx.getStorageSync(app.config.tokenKey) + |
| | | "&recordLocation=" + |
| | | this.data.currentPage |
| | | } else { |
| | | url = app.config.epubUrl + |
| | | "?md5=" + |
| | | data.md5 + |
| | | "&bookName=" + |
| | | data.fileName + |
| | | "&url=" + app.config.requestCtx + |
| | | "&token=" + |
| | | wx.getStorageSync(app.config.tokenKey) + |
| | | "&recordLocation=" + |
| | | this.data.currentPage + "&freeEpubPage=" + data.freePage |
| | | } |
| | | } else { |
| | | url = app.config.pdfUrl + |
| | | "?md5=" + |
| | | data.md5 + |
| | | "&bookName=" + |
| | | data.fileName + |
| | | "&url=" + app.config.requestCtx + |
| | | "&token=" + |
| | | wx.getStorageSync(app.config.tokenKey) + |
| | | "&recordLocation=" + |
| | | this.data.currentPage; |
| | | } |
| | | this.setData({ |
| | | src: url |
| | | }) |
| | |
| | | domain: "bookReadProgress", |
| | | key: this.data.epubObj.md5, |
| | | value: JSON.stringify(data), |
| | | },], |
| | | }, ], |
| | | }) |
| | | .then((res) => { }); |
| | | .then((res) => {}); |
| | | } |
| | | }, |
| | | |
| | |
| | | percentage, |
| | | type |
| | | } = |
| | | e.detail.data[0]; |
| | | e.detail.data[0]; |
| | | if (type == "progress" && type != "backDetail") { |
| | | this.setProgress({ |
| | | page: currentLocation, |