From 3fdcbf92b629d07138e29df77a368981d889c756 Mon Sep 17 00:00:00 2001 From: weifashi <605403358@qq.com> Date: Mon, 13 Nov 2023 17:13:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=20=E6=96=87=E4=BB=B6=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=E5=8F=AA=E8=AF=BB=E7=A6=81=E6=AD=A2=E4=B8=8B=E8=BD=BD=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/FileController.php | 2 +- resources/assets/js/pages/manage/file.vue | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Api/FileController.php b/app/Http/Controllers/Api/FileController.php index 0806e815a..186f44268 100755 --- a/app/Http/Controllers/Api/FileController.php +++ b/app/Http/Controllers/Api/FileController.php @@ -479,7 +479,7 @@ class FileController extends AbstractController // if (Base::isNumber($id)) { $user = User::auth(); - $file = File::permissionFind(intval($id), $user); + $file = File::permissionFind(intval($id), $user, $down == 'yes' ? 1 : 0); } elseif ($id) { $fileLink = FileLink::whereCode($id)->first(); $file = $fileLink?->file; diff --git a/resources/assets/js/pages/manage/file.vue b/resources/assets/js/pages/manage/file.vue index b27d87501..a1653e75b 100644 --- a/resources/assets/js/pages/manage/file.vue +++ b/resources/assets/js/pages/manage/file.vue @@ -49,7 +49,7 @@ {{$L('剪切')}} - @@ -198,8 +198,8 @@ {{$L('退出共享')}} {{$L('发送')}} {{$L('链接')}} - {{$L('下载')}} - {{$L('压缩下载')}} + {{$L('下载')}} + {{$L('压缩下载')}} {{$L('删除')}} @@ -848,6 +848,10 @@ export default { } else { return Math.max(300, this.windowHeight - 200) } + }, + + compressedSownloadDisabled() { + return this.fileList?.find((res)=> res._checked && res.permission < 1) ? true : false } },