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 @@