wx.openDocument() 打不开pdf文档,文件下载好了没反应?
wx.downloadFile({
url: ‘https://www.xxxx.com/api/wechat/nfiles/download?fileid=1&userid=1’, //仅为示例,并非真实的资源
success: function (res) {
// this.setData({
// files: res.tempFilePath
// })
wx.openDocument({
filePath: res.tempFilePath,
success: function (res) {
console.log(‘打开文档成功’)
}
})
}
文件下载好了没反应,提示unable to find app to open this type of document
