hbulider调试有效,离线打包报错
代码:
downloadFile(info){
uni.downloadFile({
url: this.constApis.LAWSDOWNLOAD.URL+"?id="+info+"&tableName=2",
success: function (res) {
var filePath = res.tempFilePath;
uni.saveFile({
tempFilePath: filePath,
success: function (res) {
var savedFilePath = res.savedFilePath;
console.log("保存文件路径:="+savedFilePath);
uni.openDocument({
filePath: savedFilePath,
success: function (res) {
uni.showToast({
icon: 'none',
duration: 1000,
title: "chenggong=="+JSON.stringify(res)
});
console.log('打开文档成功');
},
fail:function (res) {
uni.showToast({
icon: 'none',
duration: 1000,
title: "shiba==="+JSON.stringify(res)
});
}
});
}
});
},
fail:function (res) {
}
});
}
android调试报错
道道123
io.dcloud.HBuilder.dc.fileprovider这个是自己创建的文件吗?
2020-09-23 14:31
1***@qq.com
终于解决了 谢谢!!
2022-05-10 14:49