From b72f29b906061c3a1d2d477b5e498a83d615d482 Mon Sep 17 00:00:00 2001 From: yanzai Date: Mon, 16 Jun 2025 11:46:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E5=91=8A=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/index.html | 2 +- 秦皇岛四院小程序/lu/share.js | 4 ++-- 秦皇岛四院小程序/pages/test/test.vue | 13 +++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/admin/index.html b/admin/index.html index 9720bb1..b6f5d44 100644 --- a/admin/index.html +++ b/admin/index.html @@ -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' diff --git a/秦皇岛四院小程序/lu/share.js b/秦皇岛四院小程序/lu/share.js index 9e515a7..591e419 100644 --- a/秦皇岛四院小程序/lu/share.js +++ b/秦皇岛四院小程序/lu/share.js @@ -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', }; }, diff --git a/秦皇岛四院小程序/pages/test/test.vue b/秦皇岛四院小程序/pages/test/test.vue index efce0e1..ef1d213 100644 --- a/秦皇岛四院小程序/pages/test/test.vue +++ b/秦皇岛四院小程序/pages/test/test.vue @@ -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); + } + }); }, });