- 使用!empty()替代trim()来检查url字段,确保更准确的链接判断 - 保持对缩略图链接的回退功能不变
@ -119,7 +119,7 @@
<div class="d-list">
{hcTaglib:contentPage mainField="*" subField="*" name="hc_content" limit="12" item="vo" sort="sort desc"}
{php}
$dl_file = trim((string)($vo['url'] ?? ($vo['thumbnail']['url'] ?? '')));
$dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? '');
$has_dl = $dl_file !== '';
{/php}
<div class="d-item">