xwt
2025-08-03 c47ec7b37e7f68c49b40fc4b59098e79626e66de
pages/fileView/pdfView.vue
@@ -17,8 +17,14 @@
         
      },
      onLoad(option) {
         let fileUrl = decodeURIComponent(option.url)
         this.allUrl = this.viewerUrl + '?file=' + fileUrl//将插件地址与接收的文件地址拼接起来
         // let fileUrl = decodeURIComponent(option.url)
         // this.allUrl = this.viewerUrl + '?file=' + fileUrl//将插件地址与接收的文件地址拼接起来
         const base64Data = getApp().globalData.tempPDF;
         this.pdfUrl = `data:application/pdf;base64,${base64Data}`;
         this.allUrl = this.viewerUrl + '?file=' + encodeURIComponent(this.pdfUrl)
      }
   }
</script>