From fe941462a2518d0a39e611ba19a4aa49d370a33e Mon Sep 17 00:00:00 2001 From: "zhangf@suq.cn" Date: Thu, 10 Sep 2026 13:35:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(download):=20=E4=BF=AE=E5=A4=8D=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 - 修改了PHP条件表达式,使用!empty()检查url字段是否存在且非空 - 避免当url字段为false或0时导致的链接错误 - 保持原有回退到缩略图链接的功能不变 --- public/themes/website/1/zh/demo/download.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/website/1/zh/demo/download.html b/public/themes/website/1/zh/demo/download.html index 3fb126c..a128596 100755 --- a/public/themes/website/1/zh/demo/download.html +++ b/public/themes/website/1/zh/demo/download.html @@ -118,7 +118,7 @@
{hcTaglib:contentPage mainField="*" subField="*" name="hc_content" limit="12" item="vo" sort="sort desc"} - {php}$dl_file = $vo['url'] ?? ($vo['thumbnail']['url'] ?? '');{/php} + {php}$dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? '');{/php}