From 59d95c58553d35acbeac8cb3a3ff1ba3ae66bce4 Mon Sep 17 00:00:00 2001 From: wanganxp Date: Sat, 16 Dec 2023 05:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B9=8B=E5=89=8D=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/download-file/download-file.uvue | 26 +++++++--------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/pages/API/download-file/download-file.uvue b/pages/API/download-file/download-file.uvue index fa231bf6..d4b9f465 100644 --- a/pages/API/download-file/download-file.uvue +++ b/pages/API/download-file/download-file.uvue @@ -4,15 +4,13 @@ - - - + + + - + 点击按钮下载服务端示例图片(下载网络文件到本地临时目录) - - - + @@ -34,7 +32,7 @@ onLoad() { }, onUnload() { - this.imageSrc = ''; + // this.imageSrc = ''; uni.hideLoading(); this.task?.abort(); }, @@ -47,7 +45,7 @@ this.task = uni.downloadFile({ url: "https://web-assets.dcloud.net.cn/unidoc/zh/uni-app.png", success: (res) => { - console.log('downloadFile success, res is', res) + console.log('downloadFile success, res is', res.tempFilePath) self.imageSrc = res.tempFilePath; uni.hideLoading(); }, @@ -78,14 +76,6 @@ \ No newline at end of file + -- GitLab