| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | goBack() { |
| | | wx.navigateBack() |
| | | }, |
| | |
| | | //刚进来的时候调用 |
| | | handleTeachData(item) { |
| | | //图片 |
| | | console.log(item, 'item11111'); |
| | | if (item.selectType == 'picture') { |
| | | this.setData({ |
| | | showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, |
| | |
| | | app.MG.file.getPdfInfo({ |
| | | md5: item.file |
| | | }).then((res) => { |
| | | if (res && res.totalPages) { |
| | | for (let i = 0; i < res.totalPages; i++) { |
| | | let naturalResources = [] |
| | | if (res && JSON.parse(res).totalPages) { |
| | | for (let i = 0; i < JSON.parse(res).totalPages; i++) { |
| | | const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + item.file + '&index=' + (i + 1) + '&dpi=300' |
| | | this.data.naturalResources.push(src) |
| | | // console.log(this.data.naturalResources, ' this.data.naturalResources'); |
| | | naturalResources.push(src) |
| | | } |
| | | } |
| | | this.setData({ |
| | | naturalResources |
| | | }) |
| | | console.log('ppt', this.data.naturalResources); |
| | | }) |
| | | } |
| | | }, |