refactor: 调整视频输出

This commit is contained in:
2025-04-16 14:03:21 +08:00
parent 7ff78c11e5
commit 44c6ca7e70
3 changed files with 19 additions and 10 deletions

View File

@@ -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());

View File

@@ -37,7 +37,7 @@
<div class="hd">
<ul>
{volist name="video_categorys" id="vca"}
<li class="vli {eq name='vca.id' value='Request.get.id' }von{/eq}">
<li class="vli {eq name='vca.id' value='$Request.get.id'}von{/eq}">
<a href="{:url('attachment/video', ['id' => $vca.id])}" style="display: block;">{$vca.name}</a>
</li>
{/volist}
@@ -46,10 +46,11 @@
{/notempty}
<!-- 视频内容 -->
<div class="bdconten">
<ul >
{notempty name="videos"}
{volist name="videos" id="items"}
<ul >
{volist name="items" id="vo"}
<dl class="video_hotul">
{volist name="videos" id="vo"}
<dd>
<div class="hot1">
<video poster="{$vo.image}" preload="none" controls="controls">
@@ -61,14 +62,15 @@
<div class="htit2">{$vo.desc}</div>
</div>
</dd>
{/volist}
<div class="clear"></div>
</dl>
<div>{$page|raw}</div>
{else/}
<dl class="video-empty">查询无结果!</dl>
{/notempty}
{/volist}
</ul>
{/volist}
<div class="page-box">{$page|raw}</div>
{else/}
<ul><dl class="video-empty">查询无结果!</dl></ul>
{/notempty}
</div>
</div>
</div>

View File

@@ -158,12 +158,15 @@
background-color: rgba(0, 75, 250, 0.05);
cursor: pointer;
}
.orico_Page_download .downloadMain .page-box {
text-align: center;
}
.orico_Page_download .downloadMain .contact_c .pagination {
display: inline-block!important;
zoom: 1;
text-align: center;
color: #555;
clear: both;
padding-bottom: 2rem;
padding-bottom: 2rem!important;
}
.orico_Page_download .downloadMain .contact_c .pagination span {
padding: 0px 0px;