From db903bd4b3ed6e173d43fb34887a583a573843fb Mon Sep 17 00:00:00 2001 From: Chenx221 Date: Thu, 15 Feb 2024 14:40:16 +0800 Subject: [PATCH] =?UTF-8?q?single-download-btn=E6=8C=89=E9=92=AE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/js/home_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/js/home_script.js b/web/js/home_script.js index 064200f..595cdad 100644 --- a/web/js/home_script.js +++ b/web/js/home_script.js @@ -54,8 +54,8 @@ $(document).on('click', '.new-folder-btn', function () { }) $(document).on('click', '.single-download-btn', function () { - console.log('单文件下载按钮被点击'); - // 在这里添加你的代码 + var relativePath = $('.select-item:checked').first().data('relativePath'); + window.location.href = 'index.php?r=home%2Fdownload&relativePath=' + encodeURIComponent(relativePath); }); $(document).on('click', '.batch-zip-download-btn', function () {