无法下载
const openPDF = () => {
Toast.show('你是在操作');
wx.downloadFile({
url: 'https://6669-file-6gxgpszoc3fc266b-1308639227.tcb.qcloud.la/image/测试.pdf',
success(res) {
const filePath = res.tempFilePath;
Toast.show(filePath);
wx.openDocument({
filePath,
fileType: 'pdf',
success(resChild) {
console.log('打开文档成功');
console.log(resChild);
},
fail(err: any) {
Toast.show('打开文档失败');
Toast.show(err);
},
});
},
fail(err: any) {
Toast.show('下载失败');
Toast.show(err);
},
});
};
在安卓机上,提示下载失败,导致pdf无法打开