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)
}
})

 

相关文章:

  • 2022-12-23
  • 2022-03-03
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-20
  • 2022-12-23
  • 2021-11-17
  • 2021-12-11
  • 2022-02-08
  • 2022-01-01
  • 2022-02-27
相关资源
相似解决方案