优化报告下载

main
yanzai 6 months ago
parent 4b887b47f3
commit b72f29b906

@ -21,7 +21,7 @@
// env = 'dev'
// env = 'dev'
const api_url = {
main: 'https://health.sixinyun.com'
main: 'https://qhdsiyuan-api.sixinyun.com'
}
if (env === 'dev') {
api_url.main = 'http://sixintijian'

@ -11,7 +11,7 @@ export default {
}
return {
// 自定义分享内容
title: '大庆普济',
title: '秦皇岛第四医院',
path: '/pages/main/home/home', // 路径,可传递参数到指定页面
};
@ -19,7 +19,7 @@ export default {
// 分享到朋友圈
onShareTimeline() {
return {
title: '大庆普济',
title: '秦皇岛第四医院',
path: '/pages/main/home/home',
};
},

@ -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);
}
});
},
});

Loading…
Cancel
Save