From 247c9da4edc18d24f5e5715033e1637ae09c4ea9 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Thu, 10 Sep 2026 14:05:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(download):=20=E6=9B=B4=E6=96=B0=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=96=87=E4=BB=B6=E9=93=BE=E6=8E=A5=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用!empty()替代trim()来检查url字段,确保更准确的链接判断 - 保持对缩略图链接的回退功能不变 --- public/themes/website/1/en/demo/download.html | 2 +- public/themes/website/1/zh/demo/download.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/themes/website/1/en/demo/download.html b/public/themes/website/1/en/demo/download.html index 7f66e40..9812370 100755 --- a/public/themes/website/1/en/demo/download.html +++ b/public/themes/website/1/en/demo/download.html @@ -119,7 +119,7 @@
{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}
diff --git a/public/themes/website/1/zh/demo/download.html b/public/themes/website/1/zh/demo/download.html index 9859a47..da4b199 100755 --- a/public/themes/website/1/zh/demo/download.html +++ b/public/themes/website/1/zh/demo/download.html @@ -119,7 +119,7 @@
{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}