downloadImage(item) {
uni.downloadFile({
url: 'http://localhost:40003/file/service-file/download/'+item.fileStorageNo,
success: function (res) {
// var filePath = escape(res.tempFilePath);
var filePath = res.tempFilePath;
uni.showModal({
title:filePath,
});
console.log(filePath)
uni.openDocument({
filePath:filePath,
fileType:"pdf",
success: function (res) {
uni.hideLoading();
this.downloadFile_onoff = true;
console.log('打开文档成功');
},
fail(err){
uni.showModal({
title:err.errMsg,
});
uni.hideLoading();
this.downloadFile_onoff = true;
}
});
}
})
},
天生DR
可以让后端在命名时 规范统一一下
2021-10-21 10:54