{if !empty($value.tags)}
@@ -43,11 +44,8 @@
{/if}
{if !empty($value.button_text)}
-
+
{$value.button_text}
{/if}
@@ -101,28 +99,32 @@
+
+
+
@@ -203,11 +143,7 @@
-
+
+
新用户最低可5折优惠
无数个人用户的共同选择
-
+
+
域名低至9元起
优选主流域名注册服务
-
+
+
推广最高30%佣金
多种产品高额返佣
-
+
+
+
注册送2000元礼包
免费注册领取专属礼包
@@ -461,6 +463,38 @@
+ {if ( isset($data.honor) ) }
+ {foreach $data.honor as $key=>$value}
+
+
+
+ {/foreach}
+ {/if}
+
+
+
+ {$value.name}
+
+
@@ -498,13 +532,13 @@
-
+
+
+ 合作伙伴
+携手共进,合作共赢
+
+ {if ( isset($data.partner) ) }
+ {foreach $data.partner as $key=>$value}
+
+
+ {/foreach}
+ {/if}
+
+
+ {$value.name}
+
-
+
+
- {include file="footer"}
+ {include file="footer"}
\ No newline at end of file
diff --git a/js/index.js b/js/index.js
index 96a77e1..55c5a23 100644
--- a/js/index.js
+++ b/js/index.js
@@ -98,11 +98,24 @@ $(function () {
`);
});
}
+ // 合作伙伴
+ if (commentObj.partner && commentObj.partner.length > 0) {
+ commentObj.partner.forEach((item) => {
+ $("#partnerBox").append(`
+
+
+ `);
+ });
+ }
}
// 获取通用配置信息
function getCommentInfo() {
$.ajax({
- url: "/console/v1/common",
+ url: "/console/v1/theme/config",
method: "get",
headers: {
Authorization: "Bearer" + " " + localStorage.jwt,
diff --git a/plugins/addon/theme_configurator/controller/ThemeController.php b/plugins/addon/theme_configurator/controller/ThemeController.php
index a9c4a5c..e97976a 100644
--- a/plugins/addon/theme_configurator/controller/ThemeController.php
+++ b/plugins/addon/theme_configurator/controller/ThemeController.php
@@ -55,6 +55,7 @@ class ThemeController extends PluginAdminBaseController
'side' => $param['side'] ?? [],
'feedback_type' => $param['feedback_type'] ?? [],
'honor' => $param['honor'] ?? [],
+ 'partner' => $param['partner'] ?? [],
];
$model = new ThemeConfigModel();
diff --git a/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php b/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php
index a44d5fe..1007df8 100644
--- a/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php
+++ b/plugins/addon/theme_configurator/controller/clientarea/ThemeController.php
@@ -41,6 +41,7 @@ class ThemeController extends PluginBaseController
'dcim_product_link' => $config['site_config']['dcim_product_link'] ?? '',
// 以下字段需与 /console/v1/common 保持一致的扁平结构
'honor' => $config['honor'] ?? ($config['site_config']['honor'] ?? []),
+ 'partner' => $config['partner'] ?? ($config['site_config']['partner'] ?? []),
'friendly_link' => $config['friendly_link'] ?? [],
'banner' => $config['banner'] ?? [],
'header_nav' => $config['header_nav'] ?? [],
diff --git a/plugins/addon/theme_configurator/template/admin/index.html b/plugins/addon/theme_configurator/template/admin/index.html
index 1da7b91..e1cb671 100644
--- a/plugins/addon/theme_configurator/template/admin/index.html
+++ b/plugins/addon/theme_configurator/template/admin/index.html
@@ -11,34 +11,19 @@
+
+
+ ${item.name}
+
-
+
-
+
-
- handleUpload(['site_config', 'official_website_logo'], ctx)"
- >
+
+ handleUpload(['site_config', 'official_website_logo'], ctx)">
上传
@@ -48,19 +33,10 @@
@@ -168,15 +117,9 @@
- handleUpload(['side', index, 'icon'], ctx)"
- >
+ handleUpload(['side', index, 'icon'], ctx)">
上传
@@ -185,11 +128,8 @@
-
- handleUpload(['site_config', 'enterprise_qrcode'], ctx)"
- >
+
+ handleUpload(['site_config', 'enterprise_qrcode'], ctx)">
上传
@@ -69,10 +45,8 @@
-
+
@@ -80,66 +54,41 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
还没有反馈类型,点击下方按钮添加。
-
+
@@ -246,11 +182,8 @@
@@ -276,19 +209,10 @@
类型 {{ index + 1 }}
-
+
-
- handleUpload(['banner', index, 'img'], ctx)"
- >
+
+ handleUpload(['banner', index, 'img'], ctx)">
上传
@@ -301,10 +225,7 @@
-
+
@@ -351,15 +272,9 @@
- handleUpload(['honor', index, 'img'], ctx)"
- >
+ handleUpload(['honor', index, 'img'], ctx)">
上传
@@ -370,6 +285,44 @@
新增荣誉
+
+
+ 新增伙伴
+
@@ -380,10 +333,7 @@
@@ -391,12 +341,7 @@
+ 用于首页"合作伙伴"模块(partner)。
+
+
+
+
+
+ 删除
+
+
+ 伙伴 {{ index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ handleUpload(['partner', index, 'img'], ctx)">
+
+ 上传
+
+
+
+
-
+
还没有自定义导航,请点击下方按钮新增。
-
+
@@ -422,19 +367,11 @@
+
新增子菜单
@@ -507,11 +428,7 @@
导航 {{ index }}
还没有子菜单,点击下方按钮新增。
-
+
+
删除
@@ -455,17 +392,10 @@
- handleUpload(['header_nav', index, 'children', cIndex, 'icon'], ctx)
- "
- >
+ ">
上传
@@ -474,21 +404,12 @@
- 子菜单 {{ cIndex + 1 }}
-
-
+
还没有底部栏目,点击下方按钮新增。
-
+
@@ -528,19 +445,11 @@
-
+
新增链接
@@ -605,11 +508,7 @@
+
同步当前配置
应用 JSON
@@ -678,6 +577,7 @@
side: [],
feedback_type: [],
honor: [],
+ partner: [],
});
new Vue({
@@ -751,18 +651,23 @@
side: Array.isArray(data.side)
? data.side
: Array.isArray(data.side_floating_window)
- ? data.side_floating_window
- : [],
+ ? data.side_floating_window
+ : [],
feedback_type: Array.isArray(data.feedback_type)
? data.feedback_type
: Array.isArray(data.site_config && data.site_config.feedback_type)
- ? data.site_config.feedback_type
- : [],
+ ? data.site_config.feedback_type
+ : [],
honor: Array.isArray(data.honor)
? data.honor
: Array.isArray(data.site_config && data.site_config.honor)
- ? data.site_config.honor
- : [],
+ ? data.site_config.honor
+ : [],
+ partner: Array.isArray(data.partner)
+ ? data.partner
+ : Array.isArray(data.site_config && data.site_config.partner)
+ ? data.site_config.partner
+ : [],
};
if (!Array.isArray(merged.header_nav) || merged.header_nav.length === 0) {
@@ -903,6 +808,12 @@
removeHonor(index) {
this.fullConfig.honor.splice(index, 1);
},
+ addPartner() {
+ this.fullConfig.partner.push({ name: "", description: "", img: "" });
+ },
+ removePartner(index) {
+ this.fullConfig.partner.splice(index, 1);
+ },
addFeedbackType() {
if (!Array.isArray(this.fullConfig.feedback_type)) {
this.fullConfig.feedback_type = [];
@@ -1043,4 +954,4 @@
},
});
})();
-
+
\ No newline at end of file
diff --git a/public/footer.html b/public/footer.html
index ce7a782..32d9b0a 100644
--- a/public/footer.html
+++ b/public/footer.html
@@ -1,19 +1,23 @@
-
+ {if ( isset($data.friendly_link) && !empty($data.friendly_link) ) }
+
+
\ No newline at end of file
diff --git a/public/header.html b/public/header.html
index c64e36e..cb7cf73 100644
--- a/public/header.html
+++ b/public/header.html
@@ -1,30 +1,31 @@
栏目 {{ index + 1 }}
还没有链接,点击下方按钮新增。
-
+
+
删除
@@ -559,13 +468,7 @@
链接 {{ cIndex + 1 }}
-用于暂未在 UI 中开放的配置项(如复杂导航结构 header_nav/footer_nav 等)。如非必要,建议优先使用上方表单编辑。
-
-
3天 无忧退款
+
3天
+ 无忧退款
-
0元 免费备案
+
0元
+ 免费备案
-
1V1 专属客服
+
1V1
+ 专属客服
7*24
小时服务
-
-
- {if ( isset($data.friendly_link) && !empty($data.friendly_link) ) }
-
3天 无忧退款
+
3天
+ 无忧退款
0元 免费备案
+
0元
+ 免费备案
1V1 专属客服
+
1V1
+ 专属客服
7*24
小时服务
+
-
+
{/if}
-
+
-
- 联系我们
-
-
- {$data.enterprise_name|default=''}
-
- {if !empty($data.enterprise_telephone)}联系电话:{$data.enterprise_telephone}{/if}
-
-
- {if !empty($data.enterprise_mailbox)}联系邮箱:{$data.enterprise_mailbox}{/if}
-
-
-
-
-
+
+
+ 联系我们
+
+
+ {$data.enterprise_name|default=''}
+
+ {if !empty($data.enterprise_telephone)}联系电话:{$data.enterprise_telephone}{/if}
+
+
+ {if !empty($data.enterprise_mailbox)}联系邮箱:{$data.enterprise_mailbox}{/if}
+
+
+
+
+
- 友情链接:
- {foreach $data.friendly_link as $key=>$value}
- {$value.name}
- {/foreach}
-
- {else /}
-
- 友情链接:
-
- {/if}
-
-
-
- {if !empty($data.icp_info)}
- {$data.icp_info}
- {/if}
- {if !empty($data.public_security_network_preparation)}
-
- {$data.public_security_network_preparation}
-
- {/if}
- {if !empty($data.telecom_appreciation)}
- {$data.telecom_appreciation}
- {/if}
-
- {$data.copyright_info|default=''}
-
+ 友情链接:
+ {foreach $data.friendly_link as $key=>$value}
+ {$value.name}
+ {/foreach}
+
+ {else /}
+
+ 友情链接:
+
+ {/if}
+
+
+
+ {if !empty($data.icp_info)}
+ {$data.icp_info}
+ {/if}
+ {if !empty($data.public_security_network_preparation)}
+
+ {$data.public_security_network_preparation}
+
+ {/if}
+ {if !empty($data.telecom_appreciation)}
+ {$data.telecom_appreciation}
+ {/if}
+
+ {$data.copyright_info|default=''}
+
-
\ No newline at end of file
+
-
+
{if isset($data.header_nav) && !empty($data.header_nav)}
- {foreach $data.header_nav as $k=>$item}
- {if $k > 0}
- {if isset($item.children) && !empty($item.children)}
-
@@ -111,19 +112,19 @@
-
- {foreach $item.children as $child}
-
-
+ {foreach $data.header_nav as $k=>$item}
+ {if $k > 0}
+ {if isset($item.children) && !empty($item.children)}
+
- {if !empty($child.icon)}
-
- {/if}
-
-
- {/foreach}
-
-
- {$child.name}
- {$child.description}
-
+
+ {else /}
+
+ {/if}
+ {/if}
+ {/foreach}
{/if}
+ {foreach $item.children as $child}
+
+
+
+ {if !empty($child.icon)}
+
+ {/if}
+
+
+ {/foreach}
+
+
- {else /}
-
- {/if}
- {/if}
- {/foreach}
+ {$child.name}
+ {$child.description}
{if isset($data.header_nav) && !empty($data.header_nav)}
- {foreach $data.header_nav as $k=>$item}
- {if $k > 0}
-
{/if}
- {if !empty($item.file_address)}
-
- {$item.name}
-
- {else /}
-
- {/if}
- {/foreach}
+ {foreach $data.header_nav as $k=>$item}
+ {if $k > 0}
+ {$item.name}
- {/if}
-
+ {if !empty($item.file_address)}
+
+ {$item.name}
+
+ {else /}
+
+ {/if}
+ {/foreach}
{/if}
@@ -248,4 +249,4 @@
{$item.name}
+ {/if}
+ 