啊鑫
2025-07-20 fca192d3c38c5dcfbb6ace8bc71d6078f6a079b2
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>