wx.downloadFile下载服务器文件打开后提示损坏?
wx.downloadFile({
url: e.target.dataset.dir_name,
success: function (res) {
console.log(res);
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
fileType: 'pdf',
success: function (res) {
console.log('打开文档成功')
},
fail(res){
console.log(res);
}
})
}
})