| | |
| | | }, |
| | | |
| | | setWebViewSrc: function (data) { |
| | | var url = app.config.epubUrl + |
| | | var url = ""; |
| | | if (data.fileType == 'epub') { |
| | | if (data.bookBuy) { |
| | | url = app.config.epubUrl + |
| | | "?md5=" + |
| | | data.md5 + |
| | | "&bookName=" + |
| | |
| | | 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 |
| | | }) |