diff --git a/pages/API/download-file/download-file.uvue b/pages/API/download-file/download-file.uvue index fa231bf63247e5a12e3fb5ef576bb29da7160cc2..d4b9f46528ea4c6fa7db8a430dc92fb4574b731b 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 +