From 38fbb6f080b22dff408a3883b032f4fb42645962 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Sat, 5 Sep 2026 17:44:01 +0800 Subject: [PATCH 1/9] =?UTF-8?q?fix(css):=20=E8=B0=83=E6=95=B4=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E8=8F=9C=E5=8D=95=E9=97=B4=E8=B7=9D=E4=BB=A5=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/dist_static/static/css/common.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/dist_static/static/css/common.css b/public/themes/dist_static/static/css/common.css index 8d090f7..30fd366 100644 --- a/public/themes/dist_static/static/css/common.css +++ b/public/themes/dist_static/static/css/common.css @@ -1622,7 +1622,7 @@ body { }.nav-mega__links { display: flex; flex-direction: column; - gap: 1.5rem; + gap: 1rem; margin: 0; padding: 0; list-style: none; From 846a349af530cab38a601583e42a7fc99af7cbbf Mon Sep 17 00:00:00 2001 From: peijunlei Date: Sat, 5 Sep 2026 17:45:44 +0800 Subject: [PATCH 2/9] =?UTF-8?q?fix(nav):=20=E4=BC=98=E5=8C=96=E5=AD=90?= =?UTF-8?q?=E7=BB=84=E5=B1=95=E5=BC=80=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E5=90=8C=E7=BB=84=E4=BA=92=E6=96=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/dist_static/static/js/common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/themes/dist_static/static/js/common.js b/public/themes/dist_static/static/js/common.js index 59fd44b..5c9dd1d 100644 --- a/public/themes/dist_static/static/js/common.js +++ b/public/themes/dist_static/static/js/common.js @@ -103,10 +103,12 @@ $(function() { $(this).attr("aria-expanded", String(!isExpanded)); }); - // nav-mega 子组:标题 / 箭头均可展开收起 + // nav-mega 子组:标题 / 箭头均可展开收起(同组互斥) $(document).on("click", ".nav-mega__subgroup-title, .nav-mega__subgroup-toggle", function() { const $subgroup = $(this).closest(".nav-mega__subgroup"); + const $siblings = $subgroup.siblings(".nav-mega__subgroup"); const isExpanded = !$subgroup.hasClass("is-expanded"); + $siblings.removeClass("is-expanded").find(".nav-mega__subgroup-toggle").attr("aria-expanded", false); $subgroup.toggleClass("is-expanded", isExpanded); $subgroup.find(".nav-mega__subgroup-toggle").attr("aria-expanded", isExpanded); }); From 04f7fe7d8dbb40960e26bde44b1569649e360897 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Sat, 5 Sep 2026 17:49:08 +0800 Subject: [PATCH 3/9] =?UTF-8?q?fix(css):=20=E8=B0=83=E6=95=B4=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=86=85=E8=BE=B9=E8=B7=9D=E5=92=8C=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=E4=BB=A5=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/dist_static/static/css/common.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/themes/dist_static/static/css/common.css b/public/themes/dist_static/static/css/common.css index 30fd366..37da386 100644 --- a/public/themes/dist_static/static/css/common.css +++ b/public/themes/dist_static/static/css/common.css @@ -1443,7 +1443,7 @@ body { display: flex; flex-direction: column; gap: 0.5rem; - padding: 5rem; + padding: 3rem 5rem; border-right: 1px solid rgba(46, 53, 58, 0.1); }.nav-mega__cat { display: flex; @@ -1484,7 +1484,7 @@ body { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5625rem; - padding: 5rem; + padding: 3rem 5rem; padding-right: 3.5625rem; min-width: 0; }.nav-mega__panels { @@ -1496,7 +1496,7 @@ body { display: inline-flex; align-items: center; gap: 1rem; - margin-bottom: 5rem; + margin-bottom: 3rem; color: var(--color-text); font-family: "MiSans VF", "PingFang SC", sans-serif; font-size: var(--font-24); From 4a4be693ab54a6280a646e7c15ca706725160335 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Sat, 5 Sep 2026 17:51:57 +0800 Subject: [PATCH 4/9] =?UTF-8?q?fix(css):=20=E8=B0=83=E6=95=B4=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E8=8F=9C=E5=8D=95=E7=9A=84=E9=A1=B6=E9=83=A8=E5=86=85?= =?UTF-8?q?=E8=BE=B9=E8=B7=9D=E4=BB=A5=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/dist_static/static/css/common.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/dist_static/static/css/common.css b/public/themes/dist_static/static/css/common.css index 37da386..d4789f4 100644 --- a/public/themes/dist_static/static/css/common.css +++ b/public/themes/dist_static/static/css/common.css @@ -1490,7 +1490,7 @@ body { }.nav-mega__panels { min-width: 0; }.nav-mega__promo-side { - padding-top: 6.875rem; + padding-top: 4.875rem; flex-shrink: 0; }.nav-mega__heading { display: inline-flex; From fa84c4989ee2847d6f83a9fe67d45dbdc296034f Mon Sep 17 00:00:00 2001 From: xiaodong Date: Mon, 7 Sep 2026 09:18:44 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=A4=B4=E9=83=A8=E6=8A=96=E9=9F=B3?= =?UTF-8?q?=E5=BE=AE=E5=8D=9A=E7=9F=A5=E4=B9=8E=E9=93=BE=E6=8E=A5=E5=81=9A?= =?UTF-8?q?=E6=B4=BB,=E5=8F=AF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 36 ++++++++++++++++++++++ .../website/1/zh/demo/components/header.html | 12 ++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/app/common.php b/app/common.php index 6f965b1..29ba2fc 100644 --- a/app/common.php +++ b/app/common.php @@ -1695,3 +1695,39 @@ if (!function_exists('getChildCategoriesContent')) { } } } + +// 函数名:getDescriptionSeparate (查询表 hc_category 中的字段 description 根据这个字段拆分成数组返回) +// 传入 cate_id 和 separate_str, 注意为空的判断; +if (!function_exists('getDescriptionSeparate')) { + function getDescriptionSeparate($cate_id) + { + if (empty($cate_id)) { + return []; + } + + try { + $description = \think\facade\Db::table('hc_category') + ->where('id', $cate_id) + ->value('description'); + + if (empty($description)) { + return []; + } + + // 使用正则提取所有以 http:// 或 https:// 开头的链接 + // 匹配规则:以http(s)开头,直到遇到空白符或中文字符"分隔符"为止 + preg_match_all('/https?:\/\/[^\s分隔符]+/', $description, $matches); + + $result = $matches[0] ?? []; + + // 过滤空值并重新索引 + $result = array_filter($result, function ($value) { + return !empty(trim($value)); + }); + + return array_values($result); + } catch (\Exception $e) { + return []; + } + } +} diff --git a/public/themes/website/1/zh/demo/components/header.html b/public/themes/website/1/zh/demo/components/header.html index 7a664a4..a73116d 100644 --- a/public/themes/website/1/zh/demo/components/header.html +++ b/public/themes/website/1/zh/demo/components/header.html @@ -62,7 +62,13 @@ 官方微信 - - -