底栏 更新

This commit is contained in:
2026-05-19 09:21:21 +08:00
parent d64faf6ebb
commit c9a8ff13b7

View File

@@ -8667,6 +8667,7 @@ function afooter_content() {
$('.new_art>h4').html(arr.footer_title);
$('.new_art>div').html(arr.content);
} else {
@@ -8680,8 +8681,28 @@ function afooter_content() {
}
// afoor_text 页:切换栏目前移除注入的 DOM / 样式,避免来回点击叠加
function teardownFooterTextInjections() {
$('#management-team-wrapper').remove();
$('#inject-team-style, #init-partner-ships-style').remove();
}
function renderLegalFooterContent(footer) {
teardownFooterTextInjections();
$('.legal_art>h4').html(footer.footer_title);
$('.legal_art>div').html(footer.content);
var fid = String(footer.footer_id);
if (fid === '20') {
insertManagementTeam();
} else if (fid === '84') {
initPartnerships();
}
}
// 底栏政策锚点部分
function afooter_text() { // 获取地址栏信息
var footerTextXhr = null;
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
@@ -8734,17 +8755,7 @@ function afooter_text() { // 获取地址栏信息
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.footer;
$('.legal_art>h4').html(arr.footer_title);
$('.legal_art>div').html(arr.content);
if (arr.footer_id == '20') {
insertManagementTeam();
}
if (arr.footer_id == '84') {
initPartnerships();
}
renderLegalFooterContent(result.data.footer);
} else {
ShowDanger("请求失败!");
}
@@ -8758,24 +8769,25 @@ function afooter_text() { // 获取地址栏信息
$('.legal_list ul li').click(function () {
$('.legal_list ul').find(".leli_chlik").removeClass("leli_chlik")
$(this).addClass("leli_chlik")
$.ajax({
if (footerTextXhr) {
footerTextXhr.abort();
}
footerTextXhr = $.ajax({
type: 'post', url: apiUrl + 'api/Journal/getFooterAtrNew',
data: {
footer_id: this.id
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.footer;
$('.legal_art>h4').html(arr.footer_title);
$('.legal_art>div').html(arr.content);
renderLegalFooterContent(result.data.footer);
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
error: function (xhr, status) {
if (status !== 'abort') {
ShowDanger("error");
}
}
})
})
@@ -8792,6 +8804,8 @@ function afooter_text() { // 获取地址栏信息
}
function initPartnerships() {
const existingStyle1 = document.getElementById('inject-team-style');
if (existingStyle1) existingStyle1.remove();
const existingStyle = document.getElementById('init-partner-ships-style');
if (existingStyle) existingStyle.remove();
@@ -8815,8 +8829,8 @@ margin-right: 10px;
document.head.appendChild(style);
}
function insertManagementTeam() {
var teamHtml = '<div id="management-team-wrapper" ></div>';
$('.legal_art>div').after(teamHtml);
$('#management-team-wrapper').remove();
$('.legal_art>div').after('<div id="management-team-wrapper"></div>');
// 1. 核心管理团队数据前5位使用官方线上路径最后一位使用本地 img/tmrmember1.png
const teamData = [
{
@@ -8879,7 +8893,8 @@ function insertManagementTeam() {
// 重置清除旧样式
const existingStyle = document.getElementById('inject-team-style');
if (existingStyle) existingStyle.remove();
const existingStyle2 = document.getElementById('init-partner-ships-style');
if (existingStyle2) existingStyle2.remove();
// 3. 强力防御型 UI 样式注入(精准锁定完美对齐和配色)
const style = document.createElement('style');
style.id = 'inject-team-style';