From 74a008fe9884f105322557c910a0117d4f9c8d61 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Fri, 21 Nov 2025 15:47:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E6=A4=8D=E6=89=80=E6=9C=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/common.js | 11 ++++++++--- .../controller/clientarea/ThemeController.php | 1 + .../theme_configurator/model/ThemeConfigModel.php | 2 ++ .../theme_configurator/template/admin/index.html | 4 ++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/common/common.js b/common/common.js index 5129de2..07a78c8 100644 --- a/common/common.js +++ b/common/common.js @@ -237,9 +237,14 @@ $(function () { location.href = commentObj.dcim_product_link; }); }; - $(".line-server-btn").click(function () { - window.open($(this).data("url")); - }); + $(".line-server-btn").click(function () { + const commentObj = sessionStorage.commentData + ? JSON.parse(sessionStorage.commentData) + : null; + if (commentObj && commentObj.online_customer_service_link) { + window.open(commentObj.online_customer_service_link); + } + }); // 跳转函数 const goOtherPage = (url) => { sessionStorage.redirectUrl = location.href; diff --git a/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php b/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php index 30b96de..5df5882 100644 --- a/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php +++ b/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php @@ -26,6 +26,7 @@ class ThemeController extends PluginBaseController 'enterprise_mailbox' => $config['site_config']['enterprise_mailbox'] ?? '', 'enterprise_qrcode' => $config['site_config']['enterprise_qrcode'] ?? '', 'official_website_logo' => $config['site_config']['official_website_logo'] ?? '', + 'online_customer_service_link' => $config['site_config']['online_customer_service_link'] ?? '', 'icp_info' => $config['site_config']['icp_info'] ?? '', 'icp_info_link' => $config['site_config']['icp_info_link'] ?? '', 'public_security_network_preparation' => $config['site_config']['public_security_network_preparation'] ?? '', diff --git a/plugins/addon/theme_configurator/model/ThemeConfigModel.php b/plugins/addon/theme_configurator/model/ThemeConfigModel.php index 0ee53b8..a292f25 100644 --- a/plugins/addon/theme_configurator/model/ThemeConfigModel.php +++ b/plugins/addon/theme_configurator/model/ThemeConfigModel.php @@ -90,6 +90,8 @@ class ThemeConfigModel 'enterprise_mailbox' => 'support@example.com', 'enterprise_qrcode' => '/upload/qrcode.png', 'official_website_logo' => '/upload/logo.png', + // 在线客服链接,对应原主题中的 online_customer_service_link + 'online_customer_service_link' => 'http://www.test.com', 'icp_info' => '京ICP备示例号', 'icp_info_link' => 'https://beian.miit.gov.cn/#/Integrated/index', 'public_security_network_preparation' => '京公网安备示例号', diff --git a/plugins/addon/theme_configurator/template/admin/index.html b/plugins/addon/theme_configurator/template/admin/index.html index 2f95991..6ce24aa 100644 --- a/plugins/addon/theme_configurator/template/admin/index.html +++ b/plugins/addon/theme_configurator/template/admin/index.html @@ -37,6 +37,10 @@ +
+ + +