From 5552f530da9061d270d7f8fb51746fa1bd29d16d Mon Sep 17 00:00:00 2001 From: "zhangf@suq.cn" Date: Thu, 10 Sep 2026 14:09:46 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat(taglib):=20=E6=94=AF=E6=8C=81=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=8F=98=E9=87=8F=E4=BD=9C=E4=B8=BA=E5=86=85=E5=AE=B9?= =?UTF-8?q?ID=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改 cid 参数处理逻辑,支持模板变量格式如 cid="$ui_invest_learn" - 添加 autoBuildVar 方法调用以运行时解析模板变量 - 区分模板变量和普通数字ID的处理方式 - 更新内容服务调用,动态传递 cid 参数而非字符串转义 - 优化代码结构提高可读性和维护性 --- app/taglib/HcTaglib.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/taglib/HcTaglib.php b/app/taglib/HcTaglib.php index 6a75948..6c3e9ba 100644 --- a/app/taglib/HcTaglib.php +++ b/app/taglib/HcTaglib.php @@ -690,7 +690,13 @@ parse; */ public function tagContentPage($tag, $content): string { - $cid = !empty($_GET['cid']) ? $_GET['cid'] : (empty($tag['cid']) ? '' : (int)$tag['cid']); + $cid = !empty($_GET['cid']) ? (int)$_GET['cid'] : (empty($tag['cid']) ? '' : $tag['cid']); + if (strpos($cid, '$') === 0) { + // cid 为模板变量(如 cid="$ui_invest_learn"),运行时解析 + $this->autoBuildVar($cid); + } else { + $cid = (int)$cid; + } $keywords = empty($_GET['keywords']) ? '' : $_GET['keywords']; $item = empty($tag['item']) ? 'vo' : $tag['item']; $mainField = empty($tag['mainField']) ? '*' : $tag['mainField']; @@ -715,7 +721,7 @@ parse; $parse = << '{$cid}', + 'cid' => {$cid}, 'item' => '{$item}', 'mainField' => '{$mainField}', 'subField' => '{$subField}', @@ -741,7 +747,7 @@ parse; $parse = << '{$cid}', + 'cid' => {$cid}, 'item' => '{$item}', 'mainField' => '{$mainField}', 'subField' => '{$subField}', From 1738c8011f360f7915ef4a63853ea26cdc1905a4 Mon Sep 17 00:00:00 2001 From: "zhangf@suq.cn" Date: Thu, 10 Sep 2026 14:19:07 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix(footer):=20=E6=81=A2=E5=A4=8D=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E5=9C=B0=E5=9B=BE=E5=92=8C=E9=9A=90=E7=A7=81=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E9=93=BE=E6=8E=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 恢复网站地图链接的真实URL路径 - 恢复隐私声明链接的真实URL路径 - 移除无效的javascript链接 - 注释掉旧的占位符链接代码 --- public/themes/website/1/zh/demo/components/footer.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/themes/website/1/zh/demo/components/footer.html b/public/themes/website/1/zh/demo/components/footer.html index 153acff..842a7fd 100755 --- a/public/themes/website/1/zh/demo/components/footer.html +++ b/public/themes/website/1/zh/demo/components/footer.html @@ -59,10 +59,10 @@ From 7b2c37f6e3bf004b6d56556b117df27618e748b6 Mon Sep 17 00:00:00 2001 From: "zhangf@suq.cn" Date: Thu, 10 Sep 2026 14:20:24 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix(footer):=20=E4=BF=AE=E5=A4=8D=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E5=9C=B0=E5=9B=BE=E9=93=BE=E6=8E=A5=E6=89=93=E5=BC=80?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=B9=B6=E8=B0=83=E6=95=B4=E9=9A=90=E7=A7=81?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E9=93=BE=E6=8E=A5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为网站地图链接添加target="_blank"属性以在新窗口打开 - 注释掉当前隐私声明链接的多语言URL配置 - 恢复隐私声明链接为javascript:void(0)占位符状态 - 保持网站地图功能正常访问 --- public/themes/website/1/zh/demo/components/footer.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/public/themes/website/1/zh/demo/components/footer.html b/public/themes/website/1/zh/demo/components/footer.html index 842a7fd..ca948be 100755 --- a/public/themes/website/1/zh/demo/components/footer.html +++ b/public/themes/website/1/zh/demo/components/footer.html @@ -59,10 +59,9 @@ From bd3da95b8b800f4a95fa9b2980ba56c63d9dcaba Mon Sep 17 00:00:00 2001 From: xiaodong Date: Thu, 10 Sep 2026 14:25:49 +0800 Subject: [PATCH 4/7] =?UTF-8?q?pdf=E4=B8=8B=E8=BD=BD=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/website/1/en/demo/download.html | 4 +++- public/themes/website/1/zh/demo/download.html | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/themes/website/1/en/demo/download.html b/public/themes/website/1/en/demo/download.html index 9812370..72cd9cc 100755 --- a/public/themes/website/1/en/demo/download.html +++ b/public/themes/website/1/en/demo/download.html @@ -119,7 +119,9 @@
{hcTaglib:contentPage mainField="*" subField="*" name="hc_content" limit="12" item="vo" sort="sort desc"} {php} - $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); + // $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); + $pdf_resource_download = $vo['main_content']['resource_download'][0] ?? ''; + $dl_file = $pdf_resource_download; $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 da4b199..72f4a02 100755 --- a/public/themes/website/1/zh/demo/download.html +++ b/public/themes/website/1/zh/demo/download.html @@ -119,7 +119,9 @@
{hcTaglib:contentPage mainField="*" subField="*" name="hc_content" limit="12" item="vo" sort="sort desc"} {php} - $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); + // $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); + $pdf_resource_download = $vo['main_content']['resource_download'][0] ?? ''; + $dl_file = $pdf_resource_download; $has_dl = $dl_file !== ''; {/php}
From 57396f55a4793dce0c93f3eeec7f28091346ed8e Mon Sep 17 00:00:00 2001 From: "zhangf@suq.cn" Date: Thu, 10 Sep 2026 14:26:21 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix(footer):=20=E6=9B=B4=E6=96=B0=E9=9A=90?= =?UTF-8?q?=E7=A7=81=E5=A3=B0=E6=98=8E=E9=93=BE=E6=8E=A5=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将隐私声明链接从 javascript:; 更改为 /system_file/hc_error/404.html - 修复了隐私声明点击无响应的问题 --- public/themes/website/1/zh/demo/components/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/website/1/zh/demo/components/footer.html b/public/themes/website/1/zh/demo/components/footer.html index ca948be..027db34 100755 --- a/public/themes/website/1/zh/demo/components/footer.html +++ b/public/themes/website/1/zh/demo/components/footer.html @@ -61,7 +61,7 @@
From 847d2b0bfde10a27a6dc1638a1cac54c893b72e3 Mon Sep 17 00:00:00 2001 From: xiaodong Date: Thu, 10 Sep 2026 14:28:14 +0800 Subject: [PATCH 6/7] debug --- public/themes/website/1/zh/demo/download.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/themes/website/1/zh/demo/download.html b/public/themes/website/1/zh/demo/download.html index 72f4a02..860308b 100755 --- a/public/themes/website/1/zh/demo/download.html +++ b/public/themes/website/1/zh/demo/download.html @@ -119,9 +119,9 @@
{hcTaglib:contentPage mainField="*" subField="*" name="hc_content" limit="12" item="vo" sort="sort desc"} {php} - // $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); - $pdf_resource_download = $vo['main_content']['resource_download'][0] ?? ''; - $dl_file = $pdf_resource_download; + $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); + // $pdf_resource_download = $vo['main_content']['resource_download'][0] ?? ''; + // $dl_file = $pdf_resource_download; $has_dl = $dl_file !== ''; {/php}
From 72976e2718c1d3aa86b7d86b4ed6fbf452babe47 Mon Sep 17 00:00:00 2001 From: xiaodong Date: Thu, 10 Sep 2026 14:33:27 +0800 Subject: [PATCH 7/7] =?UTF-8?q?pdf=E4=B8=8B=E8=BD=BD=E9=93=BE=E6=8E=A5debu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/website/1/en/demo/download.html | 2 +- public/themes/website/1/zh/demo/download.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/themes/website/1/en/demo/download.html b/public/themes/website/1/en/demo/download.html index 72cd9cc..929bc52 100755 --- a/public/themes/website/1/en/demo/download.html +++ b/public/themes/website/1/en/demo/download.html @@ -121,7 +121,7 @@ {php} // $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); $pdf_resource_download = $vo['main_content']['resource_download'][0] ?? ''; - $dl_file = $pdf_resource_download; + $dl_file = $pdf_resource_download['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 860308b..5fb634a 100755 --- a/public/themes/website/1/zh/demo/download.html +++ b/public/themes/website/1/zh/demo/download.html @@ -120,8 +120,8 @@ {hcTaglib:contentPage mainField="*" subField="*" name="hc_content" limit="12" item="vo" sort="sort desc"} {php} $dl_file = !empty($vo['url']) ? $vo['url'] : ($vo['thumbnail']['url'] ?? ''); - // $pdf_resource_download = $vo['main_content']['resource_download'][0] ?? ''; - // $dl_file = $pdf_resource_download; + $pdf_resource_download = $vo['main_content']['resource_download'][0] ?? ''; + $dl_file = $pdf_resource_download['url'] ?? ''; $has_dl = $dl_file !== ''; {/php}