| | |
| | | this.MG.file |
| | | .getPdfInfo({ md5: this.preViewMd5 }) |
| | | .then((res) => { |
| | | this.totalPage = res.totalPages |
| | | try { |
| | | if(typeof res === 'string' && res !== null ){ |
| | | this.totalPage = JSON.parse(res).totalPages |
| | | }else if(typeof res === 'object' && res !== null) { |
| | | this.totalPage = res.totalPages |
| | | } |
| | | } catch (error) { |
| | | console.log(error,'pdf返回值类型错误'); |
| | | } |
| | | this.createDom(this.currentPage) |
| | | this.loading = false |
| | | }) |
| | |
| | | }, |
| | | getPageImage(page) { |
| | | const ctx = process.env.VUE_APP_API_URL |
| | | console.log(this.preViewMd5) |
| | | |
| | | return ( |
| | | ctx + |
| | | '/file/GetPdfPageImage' + |