闫增涛
2024-10-22 7715ae3606bb01c0e9f08f40e83bfed0d983c6a3
src/components/pdfview/index.vue
@@ -141,7 +141,15 @@
      this.MG.file
        .getPdfInfo({ md5: this.preViewMd5 })
        .then((res) => {
          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
        })
@@ -154,8 +162,6 @@
    },
    getPageImage(page) {
      const ctx = process.env.VUE_APP_API_URL
      console.log(this.preViewMd5)
      return (
        ctx +
        '/file/GetPdfPageImage' +