手机型号:基本是华为手机
代码片段:
wx.downloadFile({
url: pdf,
success: (res => {
wx.openDocument({
filePath: res.tempFilePath,
fileType: 'pdf',
success: (response => {
console.log(response)
)
}),
fail: (fail => {
console.log("fail-----openDocument", fail)
})
})
}),
fail: (fail => {
wx.showToast({title: '暂无法查看pdf,请稍后再试'})
console.log("fail-----downloadFile", fail)
})
})
报错:fail-----downloadFile wx.downloadFile: fail fail:time out
查看pdf文件,先download但是一直报wx.downloadFile: fail fail:time out
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
url: pdf,
success: (res => {
wx.openDocument({
filePath: res.tempFilePath,
fileType: 'pdf',
success: (r => {
console.log(r)
}),
fail: (fail => {
console.log("fail-----openDocument", fail)
})
})
}),
fail: (fail => {
console.log("fail-----downloadFile", fail)
})
})