const openFlie = (item : any) => {
console.log("文件", item)
uni.downloadFile({
// url: http_url.baseUrl+"/uploadfiles"+item.pathRelative,
url: 'http://内部地址:8070/ECSAPI/ControlPlan/2005B2113.pdf',//这个地址在浏览器能正常打开
success: function (res) {
uni.hideLoading()
uni.openDocument({
filePath: res.tempFilePath,
showMenu: true,
success: function (res : any) {
console.log('打开文档成功', res);
},
fail: function (err) {
console.error('文件打开失败', err);
}
});
},
fail: (err) => {
console.error('下载失败', err)
}
});
}
报错!!
{
"errMsg": "openDocument:fail not found 3th activity",
"code": 1
}
0 个回复