| | |
| | | // packageBookService/pages/components/webView/index.js |
| | | const app = getApp() |
| | | import { |
| | | loginInfo |
| | | } from '../../../../assets/js/login'; |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | src: '' |
| | | }) |
| | | if (options) { |
| | | console.log(options) |
| | | wx.setNavigationBarTitle({ |
| | | title: options.fileName, |
| | | skeletonLoding: true |
| | | }) |
| | | this.getProgress(options) |
| | | } |
| | | } |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (token) { |
| | | this.getProgress(options) |
| | | } else { |
| | | this.setWebViewSrc(options); |
| | | } |
| | | |
| | | }, |
| | | |
| | | onLoadWeb(e) { |
| | |
| | | const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + data.md5 + '&index=' + (i + 1) + '&dpi=300' |
| | | list.push(src) |
| | | } |
| | | console.log(list) |
| | | that.setData({ |
| | | pdfList: list, |
| | | skeletonLoding: false, |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | // 获取UserKey |
| | | getProgress: function (dataObj) { |
| | |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | |
| | | //预览图片,放大预览 |
| | | preview(event) { |
| | | let urls = [event.currentTarget.dataset.src] |
| | | wx.previewImage({ |
| | | urls: urls // 需要预览的图片http链接列表 |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | }) |