闫增涛
2025-03-26 cf6e9bcbfc64019bb14fb0964576ae3e3bd2fde5
src/components/pdfview/index.vue
@@ -104,6 +104,7 @@
      this.localDialogVisible = true
    },
    async downloadPdf() {
      console.log(this.preViewMd5)
      window.open(await getResourcePath(this.preViewMd5))
    },
    domViewer() {
@@ -170,13 +171,16 @@
        .then((res) => {
          try {
            if (typeof res === 'string' && res !== null) {
              console.log(134)
              this.totalPage = JSON.parse(res).totalPages
            } else if (typeof res === 'object' && res !== null) {
              console.log(res.totalPages)
              this.totalPage = res.totalPages
            }
          } catch (error) {
            console.log(error, 'pdf返回值类型错误');
          }
          console.log(this.currentPage,"111")
          this.createDom(this.currentPage)
          this.loading = false
        })