小程序预览PDF文件
https://blog.csdn.net/qq_33744228/article/details/80240910(链接)
wx.downloadFile({ url: 'https://*****.***.work/videos/test2.pdf', success: function (res) { console.log(res) var Path = res.tempFilePath //返回的文件临时地址,用于后面打开本地预览所用 wx.openDocument({ filePath: Path, success: function (res) { console.log('打开文档成功') } }) }, fail:function (res){ console.log(res) } })
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

