|
|
|
|
@ -36,6 +36,19 @@
|
|
|
|
|
success: function(res) {
|
|
|
|
|
downLoadOk.value = true
|
|
|
|
|
filePath.value = res.tempFilePath;
|
|
|
|
|
const newFilePath = `${wx.env.USER_DATA_PATH}/${e.url.split('/').pop()}`;
|
|
|
|
|
uni.saveFile({
|
|
|
|
|
tempFilePath:res.tempFilePath, // 临时文件路径
|
|
|
|
|
filePath: newFilePath, // 新的文件路径
|
|
|
|
|
success: (saveResult) => {
|
|
|
|
|
console.log("文件保存成功,新路径为:", saveResult.savedFilePath);
|
|
|
|
|
filePath.value= saveResult.savedFilePath
|
|
|
|
|
},
|
|
|
|
|
fail: (saveErr) => {
|
|
|
|
|
console.error("文件保存失败:", saveErr);
|
|
|
|
|
reject(saveErr);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|