From fae702dcab8fb19eb4e6d48610fe7d4a4987bf68 Mon Sep 17 00:00:00 2001 From: Lee-1203 <342694918@qq.com> Date: Tue, 15 Mar 2022 11:20:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8D=E9=A6=88=E4=BF=AE=E6=94=B9=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/home.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pages/home/home.js b/pages/home/home.js index 0fe3316..974568a 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -29,6 +29,20 @@ Page({ dd.$toolAll.removeCache('isInFirst'); // 钉钉跳转 dd.navigateTo({url: '/pages/login/login'}); + }else if(e.detail.name !== 'clearAll' && e.detail.name !== ''){ + dd.downloadFile({ + url: e.detail.name, + success({ filePath }) { + dd.previewImage({ + urls: [filePath], + }); + }, + fail(res) { + dd.alert({ + content: res.errorMessage || res.error, + }); + }, + }); } } });