wx.downloadFile({
url:"https://xxxxxx.pdf",
success(res){
console.log(res)
let data = res.tempFilePath;
wx.openDocument({
filePath:data,
fileType:‘pdf‘
})
}
})
原文来自:https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.openDocument.html原文:https://www.cnblogs.com/chenguiya/p/12564317.html