wx.downloadFile访问纯字符串的地址没有问题。拼接的就会返回404?
wx.downloadFile({
url: 'https://www.ikaiyin.com/email/cm/Journalism Critical Issues by Stuart Allan (z-lib.org).pdf',
//url: 'https://www.ikaiyin.com/email/cm/'+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);
}
})
}
})
第二行注释就无法访问了返回404