diff --git a/common/common.js b/common/common.js
index 2761dcc..0d6ed82 100644
--- a/common/common.js
+++ b/common/common.js
@@ -189,35 +189,39 @@ $(function () {
},
});
};
- // 设置通用信息函数
- const setCommData = () => {
- const commentObj = JSON.parse(sessionStorage.commentData);
- $("#enterprise_name").text(commentObj.enterprise_name);
- $(".com-contact-tel").text(commentObj.enterprise_telephone);
- $("#enterprise_telephone").text(
- `联系电话:${commentObj.enterprise_telephone}`
- );
- $("#enterprise_mailbox").text(`联系邮箱:${commentObj.enterprise_mailbox}`);
- $("#enterprise_qrcode").attr("src", commentObj.enterprise_qrcode);
- $("#logo").attr("src", commentObj.official_website_logo);
- if (commentObj.friendly_link.length > 0) {
- $("#index #footerLink").attr("style", "display: block;");
- commentObj.friendly_link.forEach((item) => {
- $("#footerLink").append(
- `${item.name}`
- );
- });
- } else {
- $("#footerLink").attr("style", "display: none;");
- }
- $("#footerRecord").prepend(`
-
- `);
- $("#copyright_info").text(commentObj.copyright_info);
+ // 设置通用信息函数
+ const setCommData = () => {
+ const commentObj = JSON.parse(sessionStorage.commentData);
+ $("#enterprise_name").text(commentObj.enterprise_name);
+ $(".com-contact-tel").text(commentObj.enterprise_telephone);
+ $("#enterprise_telephone").text(
+ `联系电话:${commentObj.enterprise_telephone}`
+ );
+ $("#enterprise_mailbox").text(`联系邮箱:${commentObj.enterprise_mailbox}`);
+ $("#enterprise_qrcode").attr("src", commentObj.enterprise_qrcode);
+ $("#logo").attr("src", commentObj.official_website_logo);
+ if (commentObj.friendly_link.length > 0) {
+ $("#index #footerLink").attr("style", "display: block;");
+ // 先清空,再填充,避免重复叠加
+ $("#footerLink a").remove();
+ commentObj.friendly_link.forEach((item) => {
+ $("#footerLink").append(
+ `${item.name}`
+ );
+ });
+ } else {
+ $("#footerLink").attr("style", "display: none;");
+ }
+
+ // 统一覆盖底部备案信息和版权
+ $("#footerRecord").html(`
+
+ ${commentObj.copyright_info}
+ `);
$("#terms_service_url").click(function () {
location.href = commentObj.terms_service_url;
});
diff --git a/public/footer.html b/public/footer.html
index 7753d1e..8c3f53d 100644
--- a/public/footer.html
+++ b/public/footer.html
@@ -122,20 +122,20 @@
友情链接:
{/if}
- {if ( isset($data.config) ) }
-
- {else /}
-
- {/if}
-
-
+ {if ( isset($data.config) ) }
+
+ {else /}
+
+ {/if}
+
+