底栏 更新
This commit is contained in:
@@ -8669,6 +8669,7 @@ function afooter_content() {
|
|||||||
$('.new_art>div').html(arr.content);
|
$('.new_art>div').html(arr.content);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ShowDanger("请求失败!");
|
ShowDanger("请求失败!");
|
||||||
}
|
}
|
||||||
@@ -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() { // 获取地址栏信息
|
function afooter_text() { // 获取地址栏信息
|
||||||
|
var footerTextXhr = null;
|
||||||
|
|
||||||
function getQueryString(name) {
|
function getQueryString(name) {
|
||||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||||
var r = window.location.search.substr(1).match(reg);
|
var r = window.location.search.substr(1).match(reg);
|
||||||
@@ -8734,17 +8755,7 @@ function afooter_text() { // 获取地址栏信息
|
|||||||
},
|
},
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
if (result.code == 0) {
|
if (result.code == 0) {
|
||||||
var arr = result.data.footer;
|
renderLegalFooterContent(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();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ShowDanger("请求失败!");
|
ShowDanger("请求失败!");
|
||||||
}
|
}
|
||||||
@@ -8758,25 +8769,26 @@ function afooter_text() { // 获取地址栏信息
|
|||||||
$('.legal_list ul li').click(function () {
|
$('.legal_list ul li').click(function () {
|
||||||
$('.legal_list ul').find(".leli_chlik").removeClass("leli_chlik")
|
$('.legal_list ul').find(".leli_chlik").removeClass("leli_chlik")
|
||||||
$(this).addClass("leli_chlik")
|
$(this).addClass("leli_chlik")
|
||||||
$.ajax({
|
if (footerTextXhr) {
|
||||||
|
footerTextXhr.abort();
|
||||||
|
}
|
||||||
|
footerTextXhr = $.ajax({
|
||||||
type: 'post', url: apiUrl + 'api/Journal/getFooterAtrNew',
|
type: 'post', url: apiUrl + 'api/Journal/getFooterAtrNew',
|
||||||
data: {
|
data: {
|
||||||
footer_id: this.id
|
footer_id: this.id
|
||||||
},
|
},
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
if (result.code == 0) {
|
if (result.code == 0) {
|
||||||
var arr = result.data.footer;
|
renderLegalFooterContent(result.data.footer);
|
||||||
|
|
||||||
$('.legal_art>h4').html(arr.footer_title);
|
|
||||||
$('.legal_art>div').html(arr.content);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ShowDanger("请求失败!");
|
ShowDanger("请求失败!");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function (xhr, status) {
|
||||||
|
if (status !== 'abort') {
|
||||||
ShowDanger("error!");
|
ShowDanger("error!");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -8792,6 +8804,8 @@ function afooter_text() { // 获取地址栏信息
|
|||||||
|
|
||||||
}
|
}
|
||||||
function initPartnerships() {
|
function initPartnerships() {
|
||||||
|
const existingStyle1 = document.getElementById('inject-team-style');
|
||||||
|
if (existingStyle1) existingStyle1.remove();
|
||||||
const existingStyle = document.getElementById('init-partner-ships-style');
|
const existingStyle = document.getElementById('init-partner-ships-style');
|
||||||
if (existingStyle) existingStyle.remove();
|
if (existingStyle) existingStyle.remove();
|
||||||
|
|
||||||
@@ -8815,8 +8829,8 @@ margin-right: 10px;
|
|||||||
document.head.appendChild(style);
|
document.head.appendChild(style);
|
||||||
}
|
}
|
||||||
function insertManagementTeam() {
|
function insertManagementTeam() {
|
||||||
var teamHtml = '<div id="management-team-wrapper" ></div>';
|
$('#management-team-wrapper').remove();
|
||||||
$('.legal_art>div').after(teamHtml);
|
$('.legal_art>div').after('<div id="management-team-wrapper"></div>');
|
||||||
// 1. 核心管理团队数据(前5位使用官方线上路径,最后一位使用本地 img/tmrmember1.png)
|
// 1. 核心管理团队数据(前5位使用官方线上路径,最后一位使用本地 img/tmrmember1.png)
|
||||||
const teamData = [
|
const teamData = [
|
||||||
{
|
{
|
||||||
@@ -8879,7 +8893,8 @@ function insertManagementTeam() {
|
|||||||
// 重置清除旧样式
|
// 重置清除旧样式
|
||||||
const existingStyle = document.getElementById('inject-team-style');
|
const existingStyle = document.getElementById('inject-team-style');
|
||||||
if (existingStyle) existingStyle.remove();
|
if (existingStyle) existingStyle.remove();
|
||||||
|
const existingStyle2 = document.getElementById('init-partner-ships-style');
|
||||||
|
if (existingStyle2) existingStyle2.remove();
|
||||||
// 3. 强力防御型 UI 样式注入(精准锁定完美对齐和配色)
|
// 3. 强力防御型 UI 样式注入(精准锁定完美对齐和配色)
|
||||||
const style = document.createElement('style');
|
const style = document.createElement('style');
|
||||||
style.id = 'inject-team-style';
|
style.id = 'inject-team-style';
|
||||||
|
|||||||
Reference in New Issue
Block a user