From 9b192dbd139fbd335a1454f1472852e8004ff922 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 16 Apr 2025 14:03:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/Attachment.php | 4 ++++ app/index/view/attachment/video.html | 18 ++++++++++-------- public/static/index/css/download.css | 7 +++++-- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/index/controller/Attachment.php b/app/index/controller/Attachment.php index ae49b874..af288e40 100644 --- a/app/index/controller/Attachment.php +++ b/app/index/controller/Attachment.php @@ -120,6 +120,10 @@ class Attachment extends Common 'id' => $param['id']??null ] ]); + + if (!$videos->isEmpty()) { + $videos->setCollection($videos->getCollection()->chunk(2)); + } View::assign('videos', $videos); View::assign('page', $videos->render()); diff --git a/app/index/view/attachment/video.html b/app/index/view/attachment/video.html index 6447bbdc..cab1f2b4 100644 --- a/app/index/view/attachment/video.html +++ b/app/index/view/attachment/video.html @@ -37,7 +37,7 @@