20260304临时补救article_list

This commit is contained in:
2026-03-24 09:51:18 +08:00
parent 8da302f382
commit 9dd44cc165
34 changed files with 5827 additions and 2066 deletions

View File

@@ -2,7 +2,103 @@
var commonSupColor = 'rgb(0,112,192)'//上角标颜色
var commonTableTitleColor = 'rgb(210,90,90)'//上角标颜色
var commonSupFontColor = 'color:rgb(0,112,192);'//上角标字体颜色
const style = document.createElement('style');
style.innerHTML = `
wmath[data-wrap="inline"] {
display: inline-block !important;
width: auto !important;
}
.outiline-item-h1,.outiline-item-h1 *{
font-weight: bold;
}
.wen_rong .content-box .conthtmn .Ptitle *{
font-weight: bold !important;
font-style: normal !important;
}
.Subtitle,.Subtitle *{
font-weight: bold;
}
.mb_aform{
display:none;
}
.pos_ter{
padding:10px;
}
.pos_ter>div:nth-child(1) {
width: 25%;
}
.htmlImageNote blue{
color :#0082AA !important;
}
.htmlImageNote blue *{
color :#0082AA !important;
}
.wenzhang .wen_jian h4 i{
font-weight: 500;
font-weight: bold;
}
mytable,mytable *,myfigure,myfigure *{
color :#0082AA !important;
cursor: pointer;
}
myh3,myh3 *{
font-weight: bold !important;
}
.v4-art-top #st-2 .st-btn > img{
width:16px !important;
height: 16px !important;
}
.pos_ter>a {
width: 23%;
}
.pos_ter>div:nth-child(3) {
width: 23%;
}
.pos_ter>a {
display: flex;
align-items: center;
justify-content: center;
}
.pos_ter>a>img {
min-width: 260px;
margin-top: -10px;
}
.pos_ter>div:nth-child(3)>a:nth-child(1){
margin-left: calc((100% - 160px - 55px - 20px)/2);
}
.pos_ter>div:nth-child(1)>div:nth-child(1){
margin-left: calc((100% - 190px - 65px)/2) !important;
}
.pos_ter>div:nth-child(4) {
width: 23%; overflow:hidden;
}
.pos_ter>div:nth-child(4) img{
position: relative;
top: -16px;
}
.footer .daohang ul{
width: 26% !important;
}
.footer .daohang ul:nth-child(4) {
width: 12% !important;
}
.conthtmn_right_html .newHtml2 .pMain b *{
font-weight: bold;
}
.MaxPicture,.table_Box {
scroll-margin-top: 100px;
}
`
document.head.appendChild(style);
function loadMathJax(callback) {
const script = document.createElement('script');
@@ -24,11 +120,11 @@ function loadMathJax(callback) {
loadMathJax()
var script = document.createElement('script');
script.src = '/js/not_map.js';
script.src = '/js/not_map.js';
var script1 = document.createElement('script');
script1.src = '/echarts-master/echarts.min.js';
script1.src = '/echarts-master/echarts.min.js';
var script2 = document.createElement('script');
script2.src = '/echarts-master/world.js';
script2.src = '/echarts-master/world.js';
document.head.appendChild(script1);
document.head.appendChild(script2);
@@ -36,7 +132,7 @@ document.head.appendChild(script);
// 列表
function at_list() {
function adjustNavHeight() {
var windowHeight = window.innerHeight; // 获取页面高度
$(".anchor-nav").css("height", windowHeight + "px"); // 设置导航栏高度为页面高度
@@ -7076,8 +7172,8 @@ function getCitations(doi, a_ID) {
success: function (result) {
if (result.code == 0) {
var str1 = `<div style="text-align:center;" class="WosNumber quoteNumber"> ${result.data.list && result.data.list.length > 0 ? result.data.list.length : 0}</div>`
$('.Wos .quote-content1').html(str1)
$('.Wos .quote-content1').html(str1)
var journalCiteStr = ""
var arr = result.data.list
for (let i in arr) {
@@ -7186,9 +7282,9 @@ function getCitations(doi, a_ID) {
success: function (result) {
if (result.code == 0) {
var str1 = `<div style="text-align:center;" class="crossrefNumber quoteNumber"> ${result.data && result.data.length > 0 ? result.data.length : 0}</div>`
$('.Crossref .quote-content1').html(str1)
var arr = result.data
var arr = result.data
var journalCiteStr = ""
for (let i in arr) {
journalCiteStr += ` <div style="margin:10px 0;display:flex;"><p style="margin-right:10px;">${Number(i) + 1}.</p>
@@ -7249,7 +7345,7 @@ function getCitations(doi, a_ID) {
// 文章内容
function article_con() {
var newBox = document.querySelector('.newBox');
var commonPopupStr = `
@@ -7281,24 +7377,24 @@ function article_con() {
var a_ID = getQueryString('a_id'); //文章
var htm_ID = getQueryString('s_htm'); //目前显示html
const isPre = getQueryString('preview');
if(!isPre){
initArticleNavList(a_ID)
if (!isPre) {
initArticleNavList(a_ID)
}
// 增加访问次数
if (Jour_num == 1 || Jour_num == 11 || Jour_num == 25) {
var CiteScoreStr = ''
var marginLeft = 20
if (Jour_num == 1) {
CiteScoreStr = '2.2';
CiteScoreStr = '2.5';
marginLeft = 10
} else
if (Jour_num == 11) {
CiteScoreStr = '0.4';
}
else if (Jour_num == 25) {
CiteScoreStr = '1.7';
CiteScoreStr = '1.8';
}
if (Jour_num == 1) {
// $('#top_bar .nav_ban h2 img').css('zoom','0.75')
@@ -8672,7 +8768,7 @@ function addRowIdToData(content) {
data[i][j].rowId = rowId;
}
}
console.log('每行data数据111:', JSON.parse(JSON.stringify(data)))
const seenIds = [];
@@ -8746,9 +8842,9 @@ function initArticleHtmlFun(arr, result, html_type) {
const { header, content } = splitTable(tableList);
console.log('content at line 8641:', content); // 打印深拷贝的内容
// 打印深拷贝的内容
var { rowData, rowIds } = addRowIdToData(JSON.parse(JSON.stringify(content)))
console.log('content at line 8542:', rowIds, rowData)
// console.log('contentList at line 8571:', contentList)
contentHtml = `
@@ -8830,8 +8926,8 @@ text-align:left;color:#333;" >${item.table.note ? item.table.note : ''
}).join('');
htmlContent = `<div class="newHtml2" style="margin-left:300px;">${htmlContent}</div>`
$('.wen_rong .content-box .conthtmn').html(htmlContent);
if (result.data.refers.length > 0) { // 如果有引用数据
var refs = '';
var xuhao = 0;
@@ -8960,6 +9056,10 @@ function initArticleHtml(htmlData, refs, type) {
$('.wen_rong .content-box .conthtmn sup').each(function () {
var textContent = $(this).text().trim(); // 获取并清理文本内容
// 如果包含 + 或 - (离子的特征),直接跳过,不执行后面的标蓝逻辑
if (/[+\-]/.test(textContent)) {
return; // 结束当前循环,进入下一个 sup
}
// 判断文本是否是纯数字
if (/^\d+$/.test(textContent)) {
this.style.setProperty('color', commonSupColor, 'important');
@@ -8987,6 +9087,7 @@ function initArticleHtml(htmlData, refs, type) {
});
$('.wen_rong .content-box .conthtmn b i').each(function () {
this.style.setProperty('font-weight', 'bold', 'important');
@@ -9018,6 +9119,8 @@ function initArticleHtml(htmlData, refs, type) {
htmlData.forEach((item, index) => {
let sectionId = 'section-' + index; // 生成唯一的 ID
if (type == 0) {
@@ -9036,13 +9139,14 @@ function initArticleHtml(htmlData, refs, type) {
} else {
// 判断是否是图片
if (item.type == 1) {
var picsrc = 'https://submission.tmrjournals.com/public/articleImage/' + item.image.url;
var textContentimg = $('<div>').html(item.note).text(); // 提取纯文本
navLinks.image.push({ sectionId: sectionId, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc });
navLinks.image.push({ sectionId: sectionId, data_id: item.ami_id, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc });
} else if (item.type == 2) {
var textContentTable = $('<div>').html(item.table.title).text(); // 提取纯文本
navLinks.table.push({ sectionId: sectionId, type: 'table', text: textContentTable || 'Table ' + (index + 1), href: '#' + sectionId });
navLinks.table.push({ sectionId: sectionId, data_id: item.amt_id, type: 'table', text: textContentTable || 'Table ' + (index + 1), href: '#' + sectionId });
} else {
var textContent = $('<div>').html(item.content).text(); // 提取纯文本
@@ -9074,7 +9178,7 @@ function initArticleHtml(htmlData, refs, type) {
// 使用 map 来遍历并返回 HTML 字符串
navHtml += navLinks.image.map((link, linkIndex) => {
return `<a href="${link.href}" data-section="${link.sectionId}">
return `<a href="${link.href}" data-section="${link.sectionId}" nav-data-id="${link.data_id}">
<img src="${link.url}" style="object-fit: scale-down;width: 80px; height: 80px;border-radius:2px;border:1px solid #e0d4d4" />
<p style="margin-bottom:0; color: #333; cursor: pointer;font-family: 'Charis SIL';">Figure${linkIndex + 1}
@@ -9100,7 +9204,7 @@ function initArticleHtml(htmlData, refs, type) {
console.log(link.text, '99999')
}
return `<a data-section="${link.sectionId}" href="${link.href}" style="border-bottom: 1px solid rgb(255, 255, 255);
return `<a data-section="${link.sectionId}" href="${link.href}" nav-data-id="${link.data_id}" style="border-bottom: 1px solid rgb(255, 255, 255);
box-sizing: border-box;
font-weight: 500 !important;
padding: 2px 0 0 16px;
@@ -9241,7 +9345,49 @@ function initArticleHtml(htmlData, refs, type) {
});
$('.wordTableHtml table tr.table-header-row td').each(function () {
this.style.setProperty('border-bottom', '1px solid #000', 'important');
});
const triggerElements = document.querySelectorAll('mytable, myfigure');
triggerElements.forEach(el => {
// 1. 获取当前触发元素的 data-id (对应 nav-data-id)
const dataIndex = el.getAttribute('data-id');
if (dataIndex) {
// 2. 查找中间导航元素
const navElement = document.querySelector(`[nav-data-id="${dataIndex}"]`);
if (navElement) {
// 3. 从导航元素中提取目标 section 的 ID
const targetSectionId = navElement.getAttribute('data-section');
// 4. 绑定点击事件
el.addEventListener('click', (e) => {
e.preventDefault();
if (targetSectionId) {
// 5. 查找最终跳转的目标段落 (假设 data-section 的值就是元素的 ID)
const finalTarget = document.getElementById(targetSectionId);
if (finalTarget) {
console.log(`正在跳转至: #${targetSectionId}`);
finalTarget.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
// 可选:添加临时高亮提示用户
// highlightElement(finalTarget);
} else {
console.warn(`未找到 ID 为 "${targetSectionId}" 的目标元素`);
}
} else {
console.warn(`元素 [nav-data-id="${dataIndex}"] 上未找到 data-section 属性`);
}
});
}
}
});
});
@@ -9275,8 +9421,7 @@ function splitTable(tableList) {
}
});
//
console.log('header:', header); // 打印头部行数据
console.log('table打印内容行数据:', content); // 打印内容行数据
return { header, content };
}
@@ -9361,8 +9506,8 @@ function initArticleNavList(a_ID) {
isShowAuthorship = 1
}
// if (a_ID == 4477) {
const style = document.createElement('style');
style.innerHTML = `/* 遮罩层 */
const style = document.createElement('style');
style.innerHTML = `/* 遮罩层 */
.article_dropbtn:hover {
color: ${Journals_color};
@@ -9375,12 +9520,12 @@ function initArticleNavList(a_ID) {
}
`;
document.head.appendChild(style);
document.head.appendChild(style);
// 获取 id 为 top_bar 的元素
var topBar = document.getElementById("top_bar");
var otherStr1 = `
// 获取 id 为 top_bar 的元素
var topBar = document.getElementById("top_bar");
var otherStr1 = `
<p class=""><a href="/article_list.html?J_num=${Jour_num}&y_id=${journalStageID}" target="_blank">Current Issue</a></p>
<p class="mes_all_section_other_online"><a href="/article_list.html?J_num=${Jour_num}&o_id=${Jour_num}" target="_blank">Online First</a></p>
@@ -9390,15 +9535,15 @@ function initArticleNavList(a_ID) {
<p><a href="/article_list.html?J_num=${Jour_num}&top_id=${Jour_num}" target="_blank">Highlights</a></p>
`
var otherStr2 = `<p><a href="/tmr" target="_blank">Journal Information</a></p>
var otherStr2 = `<p><a href="/tmr" target="_blank">Journal Information</a></p>
<p><a href="/for_author.html?J_num=${Jour_num}" target="_blank">Guide for Authors</a></p>
<p><a href="javascript:;" onclick="openAbstracting(${Jour_num},'${Journals_color}')">Abstracting & Indexing</a></p>
`
// Abstracting & Indexing
var otherStr3 = `
// Abstracting & Indexing
var otherStr3 = `
<p ><a href="/afoor_text.html?footer_id=37" target="_blank">Peer-review process</a></p>
<p><a href="${localStorage.getItem('submission_url')}" target="_blank">Submission System</a></p>
<p><a href="/z_f11-1.html?J_num=${Jour_num}" target="_blank">Ethics and Malpractice Statement</a></p>
@@ -9408,7 +9553,7 @@ function initArticleNavList(a_ID) {
<p class="Authorship_text"><a href="javascript:;" onclick="openAuthorship(${Jour_num},'${Journals_color}')">Authorship</a></p>
`
var str = ` <div class="article_navbar-container">
var str = ` <div class="article_navbar-container">
<div class="article_dropdown-menu">
<div class="article_dropbtn">Articles & Issues <i class="fa fa-chevron-down" style="font-size: 14px;margin-left: 6px;"></i></div>
<div class="article_dropdown-list">
@@ -9428,13 +9573,13 @@ function initArticleNavList(a_ID) {
</div>
</div>
</div>`
// 使用 insertAdjacentHTML 在 top_bar 后插入新元素
if(topBar){
topBar.insertAdjacentHTML('afterend', str);
}
// 使用 insertAdjacentHTML 在 top_bar 后插入新元素
if (topBar) {
topBar.insertAdjacentHTML('afterend', str);
}
// JavaScript to handle dropdown toggle on button click
// JavaScript to handle dropdown toggle on button click
@@ -9482,8 +9627,8 @@ function openAuthorship(Jour_num, Journals_color) {
function showPopup(title, content, type) {
$('#common-popup .common-popup-title').html(title)
$('#common-popup .common-popup-content').html(content)
document.getElementById('common-overlay').style.display = 'block';
document.getElementById('common-overlay').style.display = 'block';
if (type == 'Authorship') {
document.getElementById('common-popup').style.width = 'auto';
renderMap(190)
@@ -9491,7 +9636,7 @@ function showPopup(title, content, type) {
document.getElementById('common-popup').style.opacity = '1';
document.getElementById('common-popup').style.zIndex = '101';
// 5秒后自动关闭
// setTimeout(closePopup, 5000);
}

View File

@@ -5,6 +5,11 @@ function initArticleY() {
// 分期时间的文章列表
// 分期时间的文章列表
if (y_ID != null) {
if(J_ID==13){
$('.footer').hide();
}else{
$('.footer').show();
}
// 分期时间
localStorage.setItem("Journals_num", J_ID);
commonInit()

View File

@@ -31,13 +31,27 @@ function commonInit() {
}
function commonGetItemHtml(doc) {
const style = document.createElement("style");
style.innerHTML = `
.tradition-content i,.tradition-content i *{
font-weight: 300 !important;
}
.tradition-content blue,.tradition-content blue *{
color: rgb(0, 112, 192) !important;
}
.tradition-content b,.tradition-content b *{
font-weight: bold !important;
}
`;
document.head.appendChild(style);
var data = doc.data;
var i = doc.i;
var img_i = doc.img_i;
var c_t_a = doc.c_t_a;
var tong_geogle = doc.tong_geogle;
console.log('img_i at line 31:', img_i)
var baseInfo = {
doi_: !data.doi ? '' : `https://doi.org/${data.doi}`,
npp_: data.npp == '' || data.npp == ' ' ? '' : `:&nbsp;${data.npp}.&nbsp;&nbsp;`,
@@ -123,7 +137,7 @@ function commonGetItemHtml(doc) {
baseInfo.trad_tion = '<div>' + data.abstract?data.abstract:'' + '</div>'
}
} else {
baseInfo.trad_tion = '<div><h3>' + data.tradition_tag + '</h3><p>' + data.tradition + '</p></div>'
baseInfo.trad_tion = '<div><h3>' + data.tradition_tag + '</h3><div class="tradition-content">' + data.tradition + '</div></div>'
}
if (data.topic && data.topic.length > 0) {

View File

@@ -3,6 +3,21 @@ var commonTableTitleColor = 'rgb(210,90,90)'//上角标颜色
var commonSupFontColor = 'color:rgb(0,112,192);'//上角标字体颜色
const style = document.createElement('style');
style.innerHTML = `
wmath[data-wrap="inline"] {
display: inline-block !important;
width: auto !important;
}
.outiline-item-h1,.outiline-item-h1 *{
font-weight: bold;
}
.wen_rong .content-box .conthtmn .Ptitle *{
font-weight: bold !important;
font-style: normal !important;
}
.Subtitle,.Subtitle *{
font-weight: bold;
}
.mb_aform{
display:none;
}
@@ -15,12 +30,22 @@ style.innerHTML = `
.htmlImageNote blue{
color :#0082AA !important;
}
.htmlImageNote blue *{
color :#0082AA !important;
}
.wenzhang .wen_jian h4 i{
font-weight: 500;
font-weight: bold;
}
mytable,mytable *,myfigure,myfigure *{
color :#0082AA !important;
cursor: pointer;
}
myh3,myh3 *{
font-weight: bold !important;
}
.v4-art-top #st-2 .st-btn > img{
@@ -61,7 +86,12 @@ margin-left: calc((100% - 190px - 65px)/2) !important;
width: 26% !important;
}
.conthtmn_right_html .newHtml2 .pMain b *{
font-weight: bold;
}
.MaxPicture,.table_Box {
scroll-margin-top: 100px;
}
`
document.head.appendChild(style);
@@ -227,7 +257,7 @@ function fetchCitationsData(doi, a_ID, callback) {
});
}
function renderCitations(citations, doi) {
let wosHtml = '';
citations.wos.forEach((item, i) => {
@@ -460,7 +490,7 @@ function article_con() {
// 将弹窗插入到页面中
newBox.insertAdjacentHTML('beforeend', commonPopupStr);
// 获取地址栏信息
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
@@ -522,7 +552,7 @@ function article_con() {
success: function (result) {
// initArticleNavList(a_ID)
$('.wenzhang .wen_rong .left').css({
'background-color': '#f4fafd',
@@ -536,6 +566,8 @@ function article_con() {
'background-color': '#fff'
})
if (result.code == 0) {
localStorage.setItem("Journals_usx", result.data.journalInfo.usx);
$('.nav_ban h1 a').attr('href', '/' + result.data.journalInfo.usx);
var html_type = result.data.articleInfo.html_type
var has_html = result.data.articleInfo.has_html
initMoreButtonTopList(result.data, a_ID)
@@ -820,7 +852,7 @@ function article_con() {
} else {
var picsrc = 'https://submission.tmrjournals.com/public/mainimg/' + arr[i].content;
var fun = "picPreview('" + picsrc + "');"
str += `<div class='imgHnkl' id="${sectionId}">` + "<img class='mainPicItem' style='max-width:500px;' onclick=" + fun + " src='https://submission.tmrjournals.com/public/mainimg/"
+ arr[i].content + "' width='" + arr[i].width + `"'/><p class='' style='font-size: 14px;font-family: 'Charis SIL';'>` + arr[i].note + "</p></div>"
}
@@ -881,7 +913,7 @@ function article_con() {
})
} else if (html_type == 1) {
var str = ''
if (Jour_num == 1) {
j_artc.abstract = j_artc.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153")
@@ -913,7 +945,7 @@ function article_con() {
},
]
for (var i = 0; i < arr.length; i++) {
let sectionId = 'section-' + i; // 生成唯一的 ID
@@ -961,7 +993,7 @@ function article_con() {
}
if (j_artc.file_html == '') {
$('.wen_rong #tablist .tarfihml').css('display', 'none');
// $('.wen_rong .rong_box .contfhml').css('display','none');
@@ -969,7 +1001,7 @@ function article_con() {
$('.wen_rong #tablist .tarfihml').html('<a href="' + imgFileUrl + 'articleHTML/' + j_artc.file_html + '" target="_blank" class="txt_html">HTML</a>');
$('.wen_rong .rong_box .contfhml ul').html('<img src="img/link_2.png" width="14" height="16" style="vertical-align: middle;"><a href="' + imgFileUrl + 'articleHTML/' + j_artc.file_html + '" target="_blank" class="txt_html"><b> HTML</b></a>');
}
if (j_artc.mhoo == '' || j_artc.mhoo == null) {
$('.wen_rong #tablist .tarmho').css('display', 'none');
$('.wen_rong .content-box .contemho').css('display', 'none');
@@ -1097,13 +1129,13 @@ function article_con() {
},
error: function (jqXHR, textStatus, errorThrown) {
ShowDanger("error");
细的错误信息
细的错误信息
}
})
});
} catch (error) {
}
}
@@ -1248,7 +1280,7 @@ function shouldColor(rowIndex, cellIndex, row) {
return false;
}
function addRowIdToData(content) {
var data = JSON.parse(JSON.stringify(content))
const rowIdMap = {};
const usedRows = new Set();
@@ -1284,7 +1316,7 @@ function addRowIdToData(content) {
data[i][j].rowId = rowId;
}
}
const seenIds = [];
@@ -1411,25 +1443,20 @@ function initTopics(a_ID) {
}
function initArticleHtmlFun(arr, result, html_type, ArticleData) {
var refersContent = '';
var htmlContent = ''
htmlContent += arr.map((item, index) => {
//批注
let contentHtml = '';
let sectionId = 'section-' + index; // 生成唯一的 ID
// 判断是否是图片
if (item.type == 1) {
var picsrc = 'https://submission.tmrjournals.com/public/articleImage/' + item.image.url;
var fun = "picPreview('" + picsrc + "');"
contentHtml = `
<p contenteditable="false" main-state="${item.state}" style="display:flex;align-items: center;
justify-content: center;" class="MaxPicture pMain" data-id="${item.ami_id
}" main-id="${item.am_id}" id="${sectionId}">
<img src="${picsrc}" onclick="${fun}" style="width: ${item.width ? `${item.width}px` : '80%'
};max-width:580px;" />
<p class="font htmlImageTitle commonTableTitleColor" style="width: ${item.width ? `${item.width}px` : '100%'};
@@ -1455,9 +1482,9 @@ function initArticleHtmlFun(arr, result, html_type, ArticleData) {
const { header, content } = splitTable(tableList);
var { rowData, rowIds } = addRowIdToData(JSON.parse(JSON.stringify(content)))
contentHtml = `
<div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${item.am_id
@@ -1491,17 +1518,35 @@ ${header
if (!cell || !cell.cellId) return '';
const content = cell.text || '';
const isBase64Image = /^<img\s+[^>]*src=["']data:image\//i.test(content);
const finalContent = isBase64Image
? content.replace(
// 1. 判断是否是 Base64 图片 (用于点击预览逻辑)
const isBase64Image = /^<img\s+[^>]*src=["']data:image\//i.test(content);
// 2. 判断是否是服务器特定的图片路径 (用于拼接域名)
const isServerPathImage = /src=["']\/public\/articleTableImage/i.test(content);
let finalContent = content;
if (isBase64Image) {
// 处理 Base64注入点击预览 picPreview
finalContent = content.replace(
/<img\s+([^>]*?)src=["'](data:image\/[^"']+)["']([^>]*)>/gi,
(match, preAttrs, src, postAttrs) => {
const safeSrc = src.replace(/'/g, "\\'");
return `<img ${preAttrs}src="${src}"${postAttrs} style="cursor:pointer;" style="max-width:500px;" onclick="picPreview('${safeSrc}')" />`;
return `<img ${preAttrs}src="${src}"${postAttrs} style="cursor:pointer; max-width:500px;" onclick="picPreview('${safeSrc}')" />`;
}
)
: content;
);
} else if (isServerPathImage) {
// 处理特定路径:拼接域名 https://submission.tmrjournals.com
finalContent = content.replace(
/<img\s+([^>]*?)src=["'](\/public\/articleTableImage[^"']+)["']([^>]*)>/gi,
(match, preAttrs, src, postAttrs) => {
const fullUrl = `https://submission.tmrjournals.com${src}`;
// 建议这里也加上 max-width 兼容性更好
return `<img ${preAttrs}src="${fullUrl}"${postAttrs} style="max-width:500px;" onclick="picPreview('${fullUrl}')" />`;
}
);
}
return `
@@ -1525,7 +1570,11 @@ text-align:left;color:#333;" >${item.table.note ? item.table.note : ''
</div>
`;
} else {
contentHtml = `<p class="${item.is_h1 ? 'Ptitle pMain' : 'pMain'} " style="font-family: 'Charis SIL';min-height:12px;" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}" id="${sectionId}">${item.content}</p>`;
contentHtml = `<p class="${[
'pMain',
item.is_h1 ? 'Ptitle' : null,
item.is_h2 ? 'Subtitle' : null
].filter(Boolean).join(' ')}" style="font-family: 'Charis SIL';min-height:12px;" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}" id="${sectionId}">${item.content}</p>`;
}
@@ -1579,9 +1628,9 @@ text-align:left;color:#333;" >${item.table.note ? item.table.note : ''
initContentHtml({ html: htmlContent, refers: refersContent }, arr, result.data.refers, html_type, { ...ArticleData })
}
async function initContentHtml(content, arr, refers, html_type, ArticleData) {
var j_artc = ArticleData.data.articleInfo
var pdf_list = ''
var pdfStr = ''
if (j_artc.file_sub && j_artc.file_sub != '') {
@@ -1625,7 +1674,12 @@ async function initContentHtml(content, arr, refers, html_type, ArticleData) {
'<div>Supplementary Material for doi: ' + j_artc.doi + '<a class="download" target="_blank" href="' + apiUrl + 'public/articleSUB2/' + j_artc.file_sub2 + '"><i class="fa fa-download"></i>Download</a></div></li>';
}
if (pdf_list != '') {
if (j_artc.file_sub_table && j_artc.file_sub_table != '') {
pdf_list += '<li class="pdf_item"><div></div>' +
'<div>Supplementary Material for doi: ' + j_artc.doi + '<a class="download" target="_blank" href="' + apiUrl + 'public/articleSUBTAB/' + j_artc.file_sub_table + '"><i class="fa fa-download"></i>Download</a></div></li>';
}
if (pdf_list != '') {
pdfStr = `<div id="ArticlePdfBox" style="" class="ArticlePdfBox"><p id="ArticlePdf" class="Ptitle " style="margin-bottom:22px;"><b>Supplementary Material</b></p>${pdf_list}</div>`
}
@@ -1809,9 +1863,9 @@ async function initContentHtml(content, arr, refers, html_type, ArticleData) {
await initArticleHtml(arr, refers, html_type, { OriginalDataStr: OriginalDataStr, pdfStr: pdfStr, trackStr: trackStr, mhooStr: mhooStr })
await initRelatedArticles(ArticleData.a_ID)
await initTopics(ArticleData.a_ID)
await fetchCitationsData(j_artc.doi, ArticleData.a_ID, async function (data) {
citationCache = data; // 存好结果,稍后再使用
await renderCitations(citationCache, j_artc.doi); // 传入上一步保存的数据
});
@@ -1819,7 +1873,7 @@ async function initContentHtml(content, arr, refers, html_type, ArticleData) {
}
function initArticleHtml(htmlData, refs, type, otherList) {
document.querySelectorAll('wmath').forEach(el => {
const latex = el.getAttribute('data-latex');
if (latex) {
@@ -1880,7 +1934,7 @@ function initArticleHtml(htmlData, refs, type, otherList) {
}
if (text === 'citation') {
citationEndIndex = index;
}
});
@@ -1903,6 +1957,10 @@ function initArticleHtml(htmlData, refs, type, otherList) {
$('.wen_rong .content-box .conthtmn sup').each(function () {
var textContent = $(this).text().trim(); // 获取并清理文本内容
// 如果包含 + 或 - (离子的特征),直接跳过,不执行后面的标蓝逻辑
if (/[+\-]/.test(textContent)) {
return; // 结束当前循环,进入下一个 sup
}
// 判断文本是否是纯数字
if (/^\d+$/.test(textContent)) {
this.style.setProperty('color', commonSupColor, 'important');
@@ -1982,10 +2040,10 @@ function initArticleHtml(htmlData, refs, type, otherList) {
var picsrc = 'https://submission.tmrjournals.com/public/articleImage/' + item.image.url;
var textContentimg = $('<div>').html(item.note).text(); // 提取纯文本
navLinks.image.push({ sectionId: sectionId, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc });
navLinks.image.push({ sectionId: sectionId, data_id: item.ami_id, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc });
} else if (item.type == 2) {
var textContentTable = $('<div>').html(item.table.title).text(); // 提取纯文本
navLinks.table.push({ sectionId: sectionId, type: 'table', text: textContentTable || 'Table ' + (index + 1), href: '#' + sectionId });
navLinks.table.push({ sectionId: sectionId, data_id: item.amt_id, type: 'table', text: textContentTable || 'Table ' + (index + 1), href: '#' + sectionId });
} else {
var textContent = $('<div>').html(item.content).text(); // 提取纯文本
@@ -2001,7 +2059,7 @@ function initArticleHtml(htmlData, refs, type, otherList) {
})
}
// 引用
var navHtml = `<div class="anchor-nav outline-container is-open" > <div class="outline-toggle">
@@ -2026,7 +2084,7 @@ function initArticleHtml(htmlData, refs, type, otherList) {
navHtml += navLinks.image.map((link, linkIndex) => {
const isHidden = linkIndex >= 3 ? 'style="display:none;" class="extra-figure"' : '';
return `<a href="${link.href}" data-section="${link.sectionId}" ${isHidden}>
return `<a href="${link.href}" data-section="${link.sectionId}" nav-data-id="${link.data_id}" ${isHidden}>
<img src="${link.url}" style="object-fit: scale-down;width: 74px; height: 74px;border-radius:2px;border:1px solid #e0d4d4" />
<p style="margin-bottom:0; color: #333; cursor: pointer;font-family: 'Charis SIL';"></p>
</a>`;
@@ -2084,7 +2142,7 @@ function initArticleHtml(htmlData, refs, type, otherList) {
// }
const isHidden = linkIndex >= 1 ? 'style="display:none;" class="extra-table"' :
``
return `<a data-section="${link.sectionId}" ${isHidden} href="${link.href}" style=";
return `<a data-section="${link.sectionId}" nav-data-id="${link.data_id}" ${isHidden} href="${link.href}" style=";
box-sizing: border-box;
font-weight: 500 !important;
padding: 2px 0 0 16px !important;
@@ -2274,7 +2332,7 @@ function initArticleHtml(htmlData, refs, type, otherList) {
this.style.setProperty('border-bottom', '1px solid #000', 'important');
});
const waitForTop = setInterval(() => {
const bar = document.querySelector('.v4-art-top');
if (bar) {
@@ -2309,9 +2367,51 @@ function initArticleHtml(htmlData, refs, type, otherList) {
});
}
}, 500);
const triggerElements = document.querySelectorAll('mytable, myfigure');
triggerElements.forEach(el => {
// 1. 获取当前触发元素的 data-id (对应 nav-data-id)
const dataIndex = el.getAttribute('data-id');
if (dataIndex) {
// 2. 查找中间导航元素
const navElement = document.querySelector(`[nav-data-id="${dataIndex}"]`);
if (navElement) {
// 3. 从导航元素中提取目标 section 的 ID
const targetSectionId = navElement.getAttribute('data-section');
// 4. 绑定点击事件
el.addEventListener('click', (e) => {
e.preventDefault();
if (targetSectionId) {
// 5. 查找最终跳转的目标段落 (假设 data-section 的值就是元素的 ID)
const finalTarget = document.getElementById(targetSectionId);
if (finalTarget) {
console.log(`正在跳转至: #${targetSectionId}`);
finalTarget.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
// 可选:添加临时高亮提示用户
// highlightElement(finalTarget);
} else {
console.warn(`未找到 ID 为 "${targetSectionId}" 的目标元素`);
}
} else {
console.warn(`元素 [nav-data-id="${dataIndex}"] 上未找到 data-section 属性`);
}
});
}
}
});
});
}
@@ -2343,16 +2443,16 @@ function splitTable(tableList) {
}
});
//
return { header, content };
}
// 图片预览
function picPreview(src) {
$('.PicPreview img').attr('src', src)
$('.PicPreview').show()
}
@@ -2373,8 +2473,24 @@ function showComments(num) {
/// ,btn: ['close']
, btnAlign: 'c'
, moveType: 1 //拖拽模式0或者1
, content: shenCode[num]
, content: shenCode[num],
success: function(layero, index) {
// success 会在弹窗 DOM 准备就绪后立即触发
const wmathElements = layero[0].querySelectorAll('wmath');
wmathElements.forEach(el => {
const latex = el.getAttribute('data-latex');
if (latex) {
el.innerHTML = latex;
}
});
// 批量渲染该弹窗内的公式
if (window.MathJax && MathJax.typesetPromise) {
MathJax.typesetPromise([layero[0]]).catch((err) => console.log(err));
}
}
});
}
function getCiteList(a_ID) {
$('.cite_box .export_cite').html('<div class="loader-01"></div>');
@@ -2424,8 +2540,8 @@ function getCiteList(a_ID) {
function initArticleNavList(a_ID) {
var Journals_color = localStorage.getItem('Journals_color')
var Journals_usx = localStorage.getItem('Journals_usx')
$('.nav_ban h1 a').attr('href', '/' + Journals_usx);
var journalStageID = localStorage.getItem('journalStageID')
//是否显示地图
var isShowAuthorship = 0;
@@ -2532,7 +2648,7 @@ function openPdf(url, j_artc, Jour_num) {
window.open(url);
}
function initMoreButtonTopList(articleInfo, a_ID) {
var j_artc = articleInfo.articleInfo
var Journals_color = localStorage.getItem('Journals_color')
var journalStageID = localStorage.getItem('journalStageID')
@@ -2619,7 +2735,7 @@ function openAbstracting(Jour_num, Journals_color) {
}
function openCite(Jour_num, Journals_color, a_ID, j_artc, data) {
var GoogleScholar = ''
if ((Math.round(Date.parse(new Date()) / 1000) - j_artc.ctime) / 86400 >= 21) {
GoogleScholar =
@@ -2723,7 +2839,7 @@ function openAuthorship(Jour_num, Journals_color) {
</div>
`
document.querySelector('#common-popup .common-popup-content').classList.add('whitebg');
showPopup(`<span style="font-weight:bold;color:${Journals_color}">Abstracting & Indexing</span>`, Abstractingcontent, 'Authorship')
showPopup(`<span style="font-weight:bold;color:${Journals_color}">The Past Three Years</span>`, Abstractingcontent, 'Authorship')
}

147
js/common/commonJS.js Normal file
View File

@@ -0,0 +1,147 @@
(function($) {
// --- 1. 万能参数获取函数 ---
var mySmartGetQuery = function(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
};
if (!window.getQueryString) {
Object.defineProperty(window, 'getQueryString', {
value: mySmartGetQuery,
writable: false,
configurable: false
});
}
$(function() {
var path = window.location.pathname;
var segments = path.split('/').filter(Boolean);
// --- 2. 识别逻辑 ---
var journalCode = null;
var pageKey = null;
var specialJournals = ['bmec', 'tmr', 'cancer', 'hpm', 'ia', 'in', 'lr', 'mdm'];
if (segments.indexOf('journals') !== -1) {
var jIndex = segments.indexOf('journals');
journalCode = segments[jIndex + 1];
pageKey = segments[segments.length - 1];
} else if (specialJournals.includes(segments[0])) {
journalCode = segments[0];
pageKey = segments[segments.length - 1];
} else {
pageKey = segments[0];
journalCode = null;
}
// --- 3. 增强版映射表 (支持多参数 + 多接口) ---
var routeMap = {
// 模式 A纯静态页面多参数传递
'peer-review-process1': {
oldPage: 'afoor_text.html',
params: { footer_id: 37, sid: 37 }
},
'editorial-workflow1': {
oldPage: 'afoor_text.html',
params: { footer_id: 76, sid: 76 }
},
'for-authors1': {
oldPage: 'afoor_text.html',
params: { footer_id: 74, sid: 74 }
},
'open-access1': {
oldPage: 'afoor_text.html',
params: { footer_id: 70, sid: 70 }
},
'for-librarians1': {
oldPage: 'afoor_text.html',
params: { footer_id: 77, sid: 77 }
},
'for-conference-organizers1': {
oldPage: 'afoor_text.html',
params: { footer_id: 78, sid: 78 }
},
// 模式 B动态页面指定不同接口
'author-guidelines': {
oldPage: 'common_for_author.html',
apiUrl: '/api/Supplementary/getJournalDetail', // 指定接口A
dynamicKey: 'J_num', // 接口返回的ID对应的URL参数名
params: { sid: 1, } // 其他固定携带参数
},
'editorial-board': {
oldPage: 'journal_members.html',
apiUrl: '/api/Journal/getMembers', // 指定接口B
dynamicKey: 'j_id',
params: { sid: 0, view: 'list' }
}
};
var config = routeMap[pageKey];
if (!config) return;
var $frame = $('frame[name="main"]');
if ($frame.length > 0) {
// 如果配置了 apiUrl 且有期刊代码,则发起 Ajax
if (config.apiUrl && journalCode) {
$.ajax({
type: 'post',
url: config.apiUrl,
data: { usx: journalCode },
dataType: 'json',
success: function(res) {
// 尝试从返回数据中获取 ID (假设字段为 journal_id 或 id)
var remoteId = res.data ? (res.data.journal_id || res.data.id) : null;
var finalId = remoteId || config.params.sid;
var title = (res.data && res.data.title) || pageKey;
renderFrame(finalId, title);
},
error: function() {
renderFrame(config.params.sid, pageKey);
}
});
} else {
// 静态模式:直接取参数中的第一个或特定 ID
var staticId = config.params.footer_id || config.params.sid;
renderFrame(staticId, pageKey);
}
}
/**
* 渲染函数:拼装所有参数
*/
function renderFrame(mainId, title) {
if (title) document.title = title;
var url = "/" + config.oldPage + "?";
// 1. 处理动态 ID (如果有)
if (config.dynamicKey) {
url += config.dynamicKey + "=" + mainId + "&";
}
// 2. 遍历 params 对象,拼入所有参数
for (var key in config.params) {
// 如果这个 key 已经在 dynamicKey 里处理过了,可以视情况跳过或覆盖
if (key === config.dynamicKey) continue;
url += key + "=" + config.params[key] + "&";
}
var finalSrc = url + "id_updated=true";
$frame.attr('src', finalSrc);
console.log("🚀 跳转路径:", finalSrc);
}
// --- 子页面注入 ---
$frame.on('load', function() {
try {
var childWin = this.contentWindow;
if (childWin && !childWin.getQueryString) {
childWin.getQueryString = mySmartGetQuery;
}
} catch (e) {}
});
});
})(jQuery);

171
js/common/commonJS1.js Normal file
View File

@@ -0,0 +1,171 @@
(function ($) {
// --- 1. 获取 URL 参数的工具函数 ---
var mySmartGetQuery = function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
};
if (!window.getQueryString) {
Object.defineProperty(window, 'getQueryString', {
value: mySmartGetQuery,
writable: false,
configurable: false
});
}
// --- 2. 公共方法:主题匹配逻辑 ---
var topicListHandler = function (res, currentCode) {
if (res && res.data && Array.isArray(res.data.topic)) {
var match = res.data.topic.find(function (item) {
var normalizedTitle = (item.title || "").toLowerCase().replace(/[\s-]/g, '');
var normalizedCode = (currentCode || "").toLowerCase().replace(/[\s-]/g, '');
return normalizedTitle === normalizedCode || (normalizedTitle + "1") === normalizedCode;
});
if (match) {
return { id: match.base_topic_id, title: 'TMR' };
}
}
return null;
};
// --- 3. 静态 ID 映射表:解决“一个页面不同 ID”的问题 ---
// 以后增加新页面只需要在这里加一行,不用建文件夹
var footerMap = {
'peer-review-process1': 37,
'editorial-workflow1': 76,
'for-authors1': 74,
'open-access1': 70,
'for-librarians1': 77,
'for-conference-organizers1': 78,
// 如果有更多,继续往这里塞...
};
$(function () {
var path = window.location.pathname;
var segments = path.split('/').filter(Boolean);
var journalCode = null;
var pageKey = null;
var specialJournals = ['bmec', 'tmr', 'cancer', 'hpm', 'ia', 'in', 'lr', 'mdm'];
// 解析当前页面的 journalCode 和 pageKey
if (segments.indexOf('journals') !== -1) {
var jIndex = segments.indexOf('journals');
journalCode = segments[jIndex + 1];
pageKey = segments[segments.length - 1];
} else if (specialJournals.includes(segments[0])) {
journalCode = segments[0];
pageKey = segments[segments.length - 1];
} else if (segments.indexOf('collection') !== -1) {
var CIndex = segments.indexOf('collection');
journalCode = segments[CIndex + 1];
pageKey = segments[segments.length - 1];
} else {
pageKey = segments[0];
journalCode = null;
}
// --- 4. 配置表重构 ---
var routeMap = {
// 学科类页面:统统指向 topicListHandler
'covid-191': { oldPage: 'artihom_list_baseid.html', apiUrl: '/api/Journal/getAllTopics', dynamicKey: 'base_id', params: { J_num: 1 }, handler: topicListHandler },
'clinical-medicine1': { oldPage: 'artihom_list_baseid.html', apiUrl: '/api/Journal/getAllTopics', dynamicKey: 'base_id', params: { J_num: 1 }, handler: topicListHandler },
'oncology1': { oldPage: 'artihom_list_baseid.html', apiUrl: '/api/Journal/getAllTopics', dynamicKey: 'base_id', params: { J_num: 1 }, handler: topicListHandler },
'food1': { oldPage: 'artihom_list_baseid.html', apiUrl: '/api/Journal/getAllTopics', dynamicKey: 'base_id', params: { J_num: 1 }, handler: topicListHandler },
'nutriology1': { oldPage: 'artihom_list_baseid.html', apiUrl: '/api/Journal/getAllTopics', dynamicKey: 'base_id', params: { J_num: 1 }, handler: topicListHandler },
'pharmacology1': { oldPage: 'artihom_list_baseid.html', apiUrl: '/api/Journal/getAllTopics', dynamicKey: 'base_id', params: { J_num: 1 }, handler: topicListHandler },
'immunology1': { oldPage: 'artihom_list_baseid.html', apiUrl: '/api/Journal/getAllTopics', dynamicKey: 'base_id', params: { J_num: 1 }, handler: topicListHandler },
'author-guidelines': {
oldPage: 'common_for_author.html',
apiUrl: '/api/Supplementary/getJournalDetail',
dynamicKey: 'J_num',
handler: function (res) {
if (res.data) return { id: res.data.journal_id || res.data.id, title: res.data.title };
return null;
}
},
// 固定结构的静态页面
'online-first1': { oldPage: 'artihom_list_oid.html', params: { J_num: 1, o_id: 1 } },
'top-cited1': { oldPage: 'artihom_list_cite.html', params: { J_num: 1, cite_id: 1 } },
'new-papers1': { oldPage: 'artihom_list_pid.html', params: { J_num: 1, p_id: 1 } },
};
// --- 5. 动态匹配逻辑:自动处理 footer 系列页面 ---
var config = routeMap[pageKey];
if (!config && footerMap[pageKey]) {
// 如果在映射表里找到了,自动指向 afoor_text.html
config = {
oldPage: 'afoor_text.html',
params: { footer_id: footerMap[pageKey] }
};
}
// 终极保底:如果页面以 1 结尾且符合学科逻辑,但没在 map 里(比如新加的学科)
if (!config && pageKey && pageKey.slice(-1) === '1') {
config = {
oldPage: 'artihom_list_baseid.html',
apiUrl: '/api/Journal/getAllTopics',
dynamicKey: 'base_id',
params: { J_num: 1 },
handler: topicListHandler
};
}
if (!config) return;
var $frame = $('frame[name="main"]');
if ($frame.length > 0) {
if (config.apiUrl && journalCode) {
var postData = config.getCustomParams ? config.getCustomParams(journalCode) : { usx: journalCode };
$.ajax({
type: 'post',
url: config.apiUrl,
data: postData,
dataType: 'json',
success: function (res) {
var result = (typeof config.handler === 'function') ? config.handler(res, journalCode) : null;
var finalId = (result && result.id) || (config.params && (config.params.sid || config.params.footer_id || config.params.J_num));
var finalTitle = (result && result.title) || pageKey;
renderFrame(finalId || 1, finalTitle);
},
error: function () {
renderFrame((config.params && (config.params.sid || config.params.J_num)) || 1, pageKey);
}
});
} else {
// 静态模式:直接取 footer_id 等参数
var staticId = config.params.footer_id || config.params.sid || config.params.J_num;
renderFrame(staticId, pageKey);
}
}
function renderFrame(mainId, title) {
if (title) document.title = title;
var url = "/" + config.oldPage + "?";
if (config.dynamicKey && mainId) url += config.dynamicKey + "=" + mainId + "&";
for (var key in config.params) {
if (key === config.dynamicKey) continue;
url += key + "=" + config.params[key] + "&";
}
$frame.attr('src', url + "id_updated=true");
}
// 保持原有的子页面交互逻辑...
$frame.on('load', function () {
try {
var $header = $('#index_top');
$header.find('[onclick*="window.location"]').each(function () {
var cmd = $(this).attr('onclick');
$(this).attr('onclick', cmd.replace('window.location', 'top.location'));
});
var childWin = this.contentWindow;
if (childWin && !childWin.getQueryString) childWin.getQueryString = mySmartGetQuery;
} catch (e) { }
});
});
})(jQuery);

View File

@@ -1,17 +1,24 @@
function commonHomePage() {
const style = document.createElement('style');
style.innerHTML = `
#index_top{
margin-bottom: 0 !important;
}
.exten_sion{
background-color: #e7f4ff5c !important;
width: 100% !important;
margin: 0 !important;
padding-bottom:40px !important;
padding-top:40px !important;
}
.apc-link {
text-decoration: none;
}
.apc-link:hover {
text-decoration: underline !important;
color: #006699 ;
}
#index_top{
margin-bottom: 0 !important;
}
.exten_sion{
background-color: #e7f4ff5c !important;
width: 100% !important;
margin: 0 !important;
padding-bottom:40px !important;
padding-top:40px !important;
}
.es_jour{
width: 1300px !important;
margin-left: 0 !important;
@@ -154,27 +161,22 @@ function commonHomePage() {
cursor: pointer;
}
`
document.head.appendChild(style);
// var SubmissionStr = ` <a target="_blank" href="https://submission.tmrjournals.com/" style="">
// <li class="rgb_color"><i class="fa fa-upload" style="font-size: 16px;font-weight: bold;color:#FFF"></i>
// Submission System</li>
// </a>`
// $('#index_top .nav .clear').prepend(SubmissionStr);
$.ajax({
type: 'get', url: apiUrl + 'api/Journal/getJournalList',
data: {},
success: function (result) {
if (result.code == 0) {
var arr = result.data.journalList;
var str = "";
for (let i = 0; i < arr.length; i++) {
var apcStr = ``;
var apcUrl = ``
if ([1, 25, 11, 17].includes(Number(arr[i].journal_id))) {
apcStr = arr[i].apc
} else {
}
else {
apcStr = arr[i].apc + `<span style="color:#006699;font-weight: bold;margin-left:6px">( 20252026 )</span>`;
}
// 获取当前期刊独有的journalAbs数据假设通过journal_id关联
@@ -187,16 +189,18 @@ function commonHomePage() {
case 1:
ImpactFactor = '1.3'
Published = '2016'
CiteScore = '2.2'
CiteScore = '2.5'
break;
//bmec
case 25:
Published = '2022'
CiteScore = '1.7'
CiteScore = '1.8'
apcUrl = `https://www.tmrjournals.com/bmec/apc`
break;
//mdm
case 11:
CiteScore = '0.4'
apcUrl = `https://www.tmrjournals.com/mdm/apc`
break;
case 2:
@@ -216,7 +220,7 @@ function commonHomePage() {
break;
case 14:
CiteScore = '0.7'
CiteScore = '0.8'
Published = '2018'
break;
case 11:
@@ -253,7 +257,11 @@ function commonHomePage() {
<p style="margin-top: 4px;font-size: 11px;"> <b>Final Decision: </b>${arr[i].finaldecision}</p>
<p style="${CiteScore ? '' : 'display:none'};margin-top: 4px;font-size: 11px;"><b>CiteScore: </b> <span style="color: #006699">${CiteScore}</span></p>
<p style="${ImpactFactor ? '' : 'display:none'};margin-top: 4px;font-size: 11px;"><b>Impact Factor: </b> <span style="color: #006699">${ImpactFactor}</span></p>
<p style="${apcStr ? '' : 'display:none'};margin-top: 4px;font-size: 11px;"><b>APC: </b> <span class="mes_APC">${apcStr}</span></p>
<p style="${apcStr ? '' : 'display:none'};margin-top: 4px;font-size: 11px;"><b>APC: </b> <span class="mes_APC">
${arr[i].journal_id == 25 || arr[i].journal_id == 11 ?
`<a href="${apcUrl}" target="_blank" class="apc-link" ><span>${apcStr}</span></a>` : apcStr
}
</span></p>
<p style="${arr_Abc && arr_Abc.length > 0 ? '' : ''}margin-top: 4px;font-size: 11px;"><b class="wl_click" style="cursor: pointer;">Indexing</b> </p>
</div>
@@ -279,11 +287,11 @@ function commonHomePage() {
// 使用当前期刊独有的journalAbs数据
var Abstractingcontent = `<ul style="margin-top:10px;">
${journalAbc.map((item, i) => {
return `<li style="font-weight:700;font-size:14px;">
return `<li style="font-weight:700;font-size:14px;">
<span style="display:inline-block">»&nbsp;</span>
<a target="_blank" href="${item.url}" style="font-weight:700;display:inline-block">${item.title}</a>
</li>`;
}).join('')}
}).join('')}
</ul>`;
document.querySelector('#common-popup .common-popup-content').classList.add('whitebg');
showPopup(`<span style="font-weight:bold;color:${journalColor}">Indexing</span>`, Abstractingcontent);

View File

@@ -127,6 +127,7 @@ function initArticleNavList() {
var Journals_color = localStorage.getItem('Journals_color')
var Journals_usx = localStorage.getItem('Journals_usx')
$('.nav_ban h1 a').attr('href', '/' + Journals_usx);
$('.nav_ban h1 a').attr('target', '_top');
var journalStageID = localStorage.getItem('journalStageID')
//是否显示地图
var isShowAuthorship = 0;
@@ -240,7 +241,7 @@ function openAuthorship(Jour_num, Journals_color) {
</div>
`
document.querySelector('#common-popup .common-popup-content').classList.add('whitebg');
showPopup(`<span style="font-weight:bold;color:${Journals_color}">Abstracting & Indexing</span>`, Abstractingcontent, 'Authorship')
showPopup(`<span style="font-weight:bold;color:${Journals_color}">The Past Three Years</span>`, Abstractingcontent, 'Authorship')
}
@@ -273,11 +274,39 @@ function closePopup() {
}
function initForAuthor(Jour_num, arr_jour) {
const style = document.createElement('style');
style.innerHTML = `.apc-link {
text-decoration: none;
}
.apc-link:hover {
text-decoration: underline !important;
color: ${arr_jour.system_color};
}`
document.head.appendChild(style);
var apcUrl = ``
var apcStr = ``;
if ([1, 25, 11].includes(Number(Jour_num))) {
switch (Number(Jour_num)) {
//bmec
case 25:
apcUrl = `https://www.tmrjournals.com/bmec/apc`
break;
//mdm
case 11:
apcUrl = `https://www.tmrjournals.com/mdm/apc`
break;
}
if ([1].includes(Number(Jour_num))) {
apcStr = arr_jour.apc
} else {
}
else if ([25, 11].includes(Number(Jour_num))) {
//bmec mdm
apcStr = `<a class="apc-link" href="${apcUrl}" target="_blank" ><span>${arr_jour.apc}</span></a>`
}
else {
apcStr = arr_jour.apc + `<span style="color: ${arr_jour.system_color};font-weight: bold;margin-left:6px;">( 20252026 )</span>`;
}

View File

@@ -5,6 +5,10 @@ var commonTableTitleColor = 'rgb(210,90,90)'//上角标颜色
var commonSupFontColor = 'color:rgb(0,112,192);'//上角标字体颜色
const style = document.createElement('style');
style.innerHTML = `
.home_logo img{
position: absolute;
top: 20px;
}
.article{
padding-top:0 !important;
}
@@ -445,8 +449,8 @@ function guest_title() {
$('.guest_content_info').html(`
if(str!=''){
$('.guest_content_info').html(`
<h3 class="rgb_color" style="line-height:22px;margin-bottom:8px;border-top: 1px solid #f1f1f1;padding-top:18px">
<b class="gue_title" style="color:${Journals_color}">${Jour_num == '22' ? '客座编辑' : 'Guest Editor'}</b>
</h3>
@@ -454,6 +458,8 @@ function guest_title() {
<div class="Guest_Editor_box" style="">${str}</div>
`);
}
$('.author-name').click(function () {
@@ -627,7 +633,7 @@ function guest_title() {
trad_tion = `<div class="tradition-box" style="width:100%;height:auto;line-height:20px;overflow:hidden;">
<div class="tradition-text">${arr[i].tradition_tag}: ${traditionText}</div>
<div class="tradition-text">${arr[i].tradition_tag}: <div class="tradition-content">${traditionText}</div></div>
</div>`;
setTimeout(() => {
@@ -658,7 +664,7 @@ function guest_title() {
trad_tion = `<div class="tradition-box" style="width:100%; max-height:${maxTradHeight}px; line-height:20px; overflow:hidden;">
<div class="tradition-text">${textContent}</div>
<div class="tradition-text"><div class="tradition-content">${textContent}</div></div>
</div>`;
}

View File

@@ -277,7 +277,7 @@ function bf_list() {
var maxHeight = 240; // 最大高度
trad_tion1 = `<div class="tradition-box" style="width:100%; max-height:${maxHeight}px; line-height:20px; overflow:hidden;">
<div class="tradition-text">${textContent}</div>
<div class="tradition-text"><div class="tradition-content">${textContent}</div></div>
</div>`;
@@ -1044,8 +1044,7 @@ if (Jour_num == 2 || Jour_num == 17 | Jour_num == 18) {
ShowDanger("error");
}
})
if(Jour_num != 13){
// 相关期刊,过往分期
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getJournal',
@@ -1053,6 +1052,7 @@ if (Jour_num == 2 || Jour_num == 17 | Jour_num == 18) {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var arr_stage = result.data.journalStage;
var str = "";
@@ -1143,6 +1143,9 @@ if (Jour_num == 2 || Jour_num == 17 | Jour_num == 18) {
ShowDanger("error");
}
})
}
// 下面新增加社区内容

View File

@@ -216,7 +216,23 @@ Date.prototype.format = function (format) {
// 头部
$('#top_bar').load('header.html')
$('#index_top').load('header_in.html')
$('#index_top').load('header_in.html', function() {
// 1. 找到所有带有跳转逻辑的 a 标签
var $logo = $(this).find('.home_logo');
// 2. 获取原有的 onclick 字符串
var oldClick = $logo.attr('onclick');
if (oldClick && oldClick.indexOf('window.location') !== -1) {
// 3. 直接将字符串里的 window 替换为 top
var newClick = oldClick.replace('window.location', 'top.location');
// 4. 重新赋值回去
$logo.attr('onclick', newClick);
console.log("✅ 已将触发方式修改为 top:", newClick);
}
});
// 高度一致

View File

@@ -148,7 +148,7 @@ function notice_con() {
//footer
if (footer_ID != null) {
notice_con_footer(footer_ID)
}
}
@@ -1127,12 +1127,15 @@ function guest_title_gea() {
})
}
function initProEditor() {
}
// 消息、cfp、footer 内容
function notice_con_footer(footer_ID) {
const style = document.createElement('style');
style.innerHTML = `
#top_bar{
@@ -1204,32 +1207,48 @@ function notice_con_footer(footer_ID) {
width: 26% !important;
}
.editor-container {
display: flex;
flex-wrap: wrap; /* 允许换行 */
width: 100%; /* 根据父容器宽度调整 */
max-width: 100%; /* 参考图片宽度 */
}
.editor-item {
color: #0a3088a6;
min-width: 18%;
margin-bottom: 10px;
margin-right: 2%;
}
.Editor_title{
font-size: 19px !important;
}
`
document.head.appendChild(style);
function initStyle() {
// 找到目标元素
const navBan = document.querySelector('.nav_ban.rgb_color_background');
if (navBan) {
// 创建一个新的 inner-wrapper div
const innerWrapper = document.createElement('div');
innerWrapper.className = 'inner_nav_ban_wrapper';
// 把 navBan 中所有子节点移动到 innerWrapper 中
while (navBan.firstChild) {
innerWrapper.appendChild(navBan.firstChild);
}
// 再把 innerWrapper 加回 navBan 中
navBan.appendChild(innerWrapper);
}
}
var newBox = document.querySelector('.newBox');
@@ -1249,7 +1268,7 @@ function notice_con_footer(footer_ID) {
// 将弹窗插入到页面中
newBox.insertAdjacentHTML('beforeend', commonPopupStr);
// 获取地址栏信息
//footer
if (footer_ID != null) {
initArticleNavList()
@@ -1304,7 +1323,7 @@ function notice_con_footer(footer_ID) {
if (arg.main == undefined) {
str += ''
} else {
str += '<b>Editor-in-Chief</b><br><br>'
str += '<b class="Editor_title">Editor-in-Chief</b><br><br>'
for (var i = 0; i < arg.main.length; i++) {
if (arg.main[i].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
@@ -1332,7 +1351,7 @@ function notice_con_footer(footer_ID) {
if (arg.remain == undefined) {
str += ''
} else {
str += '<b>Vice Editor-in-Chief</b><br><br>'
str += '<b class="Editor_title">Vice Editor-in-Chief</b><br><br>'
for (var i = 0; i < arg.remain.length; i++) {
if (arg.remain[i].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
@@ -1361,7 +1380,7 @@ function notice_con_footer(footer_ID) {
if (arg.member == undefined) {
str += ''
} else {
str += '<b>Editorial Board Members</b><br><br>'
str += '<b class="Editor_title">Editorial Board Members</b><br><br>'
// 未分组
$.each(arg.member, function (key, value) { //遍历键值对
if ($.isArray(arg.member[key]) == true) {
@@ -1437,18 +1456,18 @@ function notice_con_footer(footer_ID) {
} else {
if (arg.member[key][j].website != '') {
// Nagwa El-Badri
if(Jour_num==25&&arg.member[key][j].realname == 'Nagwa El-Badri'){
if (Jour_num == 25 && arg.member[key][j].realname == 'Nagwa El-Badri') {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, M.D. Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}else{
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, M.D. Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
arg.member[key][j].realname + ', Ph.D. '
@@ -1495,7 +1514,7 @@ function notice_con_footer(footer_ID) {
// 期刊编辑
if (editors && editors.length > 0) {
str += '<b>Editors & Staff</b><br><br>'
str += '<b class="Editor_title">Editors & Staff</b><br><br>'
for (var i = 0; i < editors.length; i++) {
if (editors[i].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
@@ -1514,11 +1533,67 @@ function notice_con_footer(footer_ID) {
+ icon_img + '</li>'
}
}
str += '<li style="clear:both">';
} else {
str += ''
}
// 1. 定义配置映射表 (以后增加新杂志只需在这里加一行)
const journalEditorsMap = {
25: [
"Jing-Yi Wang", "Peng-Huai Jia", "Yu-Tong Liu", "Jing-Wei Ma",
"Xin-Yue Zhang", "Si-Chen Liu", "Xiao-Xiao Liu", "Xin-Yun Zhang",
"Jian Jia", "Lei Cao", "Feng Wang", "Jing Yin", "Meng-Meng Song"
],
11: [
"Feng Wang", "Xin-Yun Zhang", "Lei Cao", "Jing-Wei Ma",
"Jian Jia", "Ming-Hao Wang", "Meng-Meng Song"
],
14: [
"Chen-Hui Dong", "Meng-Meng Song",
"Jian Jia",
"Lei Cao",
"Si-Chen Liu",
"Xin-Yun Zhang",
"Xiu-Jin Wei",
"Yu-Tong Liu"
],
8: [
"Huai-Peng Jia", "Xin-Yue Zhang", "Meng-Meng Song", "Jing Yin",
"Xiu-Jin Wei", "Chen-Hui Dong", "Hao-Chen Zhang", "Jing-Yi Wang",
"Zi-Yao Feng", "Qian-Nan Xie", "Man-Jin Tian", "Na Liu"
],
18: [ // 护理
"Xin-Yue Zhang", "Xiu-Jin Wei", "Lei Cao", "Si-Chen Liu",
"Yu-Tong Liu", "Na Liu", "Jing-Yi Wang", "Chen-Hui Dong",
"Guang-Ze Ma", "Zi-Yao Feng", "Chun Ling", "Nuo-Xi Pi", "Jin-Feng Liu"
],
1: [
"Jing-Yi Wang", "Huai-Peng Jia", "Jian Jia", "Meng-Meng Song",
"Jing Yin", "Xiao-Han Li", "Na Liu", "Xin-Yi Yang", "Xin-Yue Zhang"
]
};
// 2. 逻辑判断
if (journalEditorsMap[Jour_num]) {
const editors = journalEditorsMap[Jour_num];
// 生成 HTML 列表
const editorItems = editors.map(name => `<div class="editor-item">${name}</div>`).join('');
// 3. 拼接到字符串
str += `
<b style="display: block; margin-bottom: 10px;">Executive editor / Production Editor</b>
<li style="position: relative; margin-bottom: 10px; width: 100%; float: left; list-style: none;">
<div class="editor-container">
${editorItems}
</div>
</li>
`;
}
str += '<li style="clear:both">';
$('.topics>div').append('<ul style="overflow: hidden;">' + str + '</ul>');
@@ -1661,7 +1736,7 @@ function notice_con_footer(footer_ID) {
}
}
function initArticleNavList() {
var Journals_color = localStorage.getItem('Journals_color')
@@ -1673,7 +1748,7 @@ function initArticleNavList() {
if ([1, 14, 8].includes(Number(Jour_num))) {
isShowAuthorship = 1
}
const style = document.createElement('style');
style.innerHTML = `/* 遮罩层 */
.article_dropbtn:hover {
@@ -1780,7 +1855,7 @@ function openAuthorship(Jour_num, Journals_color) {
</div>
`
document.querySelector('#common-popup .common-popup-content').classList.add('whitebg');
showPopup(`<span style="font-weight:bold;color:${Journals_color}">Abstracting & Indexing</span>`, Abstractingcontent, 'Authorship')
showPopup(`<span style="font-weight:bold;color:${Journals_color}">The Past Three Years</span>`, Abstractingcontent, 'Authorship')
}

508
js/ongoing_v1.js Normal file
View File

@@ -0,0 +1,508 @@
var Journals_color = '#006699'
var commonSupColor = 'rgb(0,112,192)'//上角标颜色
var commonTableTitleColor = 'rgb(210,90,90)'//上角标颜色
var commonSupFontColor = 'color:rgb(0,112,192);'//上角标字体颜色
const style = document.createElement('style');
style.innerHTML = `
.home_logo img{
position: absolute;
top: 20px;
}
.specials_container{
min-height: calc(48vh + 6px);
}
.oae_header_tit{
line-height: 22px;
margin-bottom: 0px;
padding-top: 12px;
font-family: &quot;Helvetica Neue&quot;, Helvetica, Georgia, sans-serif;
font-size: 20px;
color: #006699;
font-weight: bold;
padding-bottom: 10px;
border-bottom: 1px solid #ddd;
margin-bottom: 20px;
}
.special-topic-item {
width:49%;
margin-bottom: 30px;
display: inline-flex;
vertical-align: top;
// margin-right: 2%;
box-sizing: border-box;
background: #fff;
padding: 10px;
align-items: flex-start;
}
.special-topic-item:nth-child(2n) {
margin-right: 0;
}
/* 左侧图片盒子 */
.special-img-box {
width: 160px;
height: 210px;
flex-shrink: 0;
margin-right: 15px;
overflow: hidden;
}
.topic-poster {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: block;
}
.special-info-box {
flex: 1;
text-align: left;
}
.topic-title:hover {
text-decoration: underline !important;
}
.topic-title {
font-size: 16px;
font-weight: bold;
color: #333;
line-height: 1.4;
margin-bottom: 4px;
text-decoration: none;
display: -webkit-box;
// -webkit-line-clamp: 3;
-webkit-box-orient: vertical;
// overflow: hidden;
}
.special-topic-item .special-info-box .topic-editors {
font-style: italic;
color: #888;
font-family: OpenSans;
font-size: 14px;
line-height: 20px;
margin-bottom: 8px !important;
padding-left: 0px !important;
}
.info-row {
font-size: 13px;
margin-bottom: 5px;
line-height: 1.4;
}
.info-label {
color: #7a2702;
font-weight: bold;
}
.info-value {
color: #444;
}
/* 链接与按钮 */
.upload-link {
margin-left: 5px;
}
.action-row {
margin-top: 10px;
}
.submit-btn {
font-size: 13px;
text-decoration: none;
transition: opacity 0.2s;
}
.submit-btn:hover {
opacity: 0.8;
text-decoration: underline;
}
.article{
padding-top:0 !important;
}
.whitebg>div p{
margin-bottom:0px !important;
}
.article .art_main{
width: 100%;
}
.guest_content{
padding:0;
}
.gue_content{
width: 100%;
margin-left:0;
}
.jour_base_info{
padding:10px !important;
border:none !important;
background-color: #f4fafd;
padding-bottom: 0px !important;
}
.gue_title{
color: #222;
font-weight: bold;
font-family: "Helvetica Neue", Helvetica, Georgia, sans-serif;
font-size: 20px;
}
.short-content-1 {
max-height: 120px;
display: -webkit-box;
-webkit-line-clamp: 5; /* 设置显示的行数 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.short-content-2 {
max-height: 174px;
display: -webkit-box;
-webkit-line-clamp: 7; /* 设置显示的行数 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.guest_content h3{
margin-top: 0 !important;
}
.jour_base_info .guest_content{
width: calc(100% - 230px);
padding-left: 20px !important;
}
.jour_base_info .gue_content{
margin-bottom:0px !important;
}
.back_fff .guest_content{
padding:15px 10px !important;
padding-top:0 !important;
}
.Submission_information span:hover{
text-decoration: underline;
cursor: pointer;
}
.jour_base_info_center{
margin: 0 !important;
padding: 10px !important;
background-color: #fff;
align-items: flex-start;
display: block;
}
.whitebg .qk_img{
width:230px !important;
height:290px !important;
margin-bottom: 0px !important;
}
.mb_aform{
display:none;
}
.pos_ter{
padding:10px;
}
.pos_ter>div:nth-child(1) {
width: 25%;
}
.pos_ter>a {
width: 23%;
}
.pos_ter>div:nth-child(3) {
width: 23%;
}
.pos_ter>div:nth-child(4) {
width: 23%;
}
.whitebg #abstract-content p{
padding-left:0 !important;
}
.footer .daohang ul{
width: 26% !important;
}
`
document.head.appendChild(style);
function loadMathJax(callback) {
const script = document.createElement('script');
// 可选:配置 MathJax必须在加载 script 前设置)
window.MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$', '$$'], ['\\[', '\\]']]
},
startup: {
typeset: false // 不自动 typeset手动触发更灵活
}
};
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
script.onload = callback;
document.head.appendChild(script);
}
loadMathJax()
var script = document.createElement('script');
script.src = '/js/not_map.js';
var script1 = document.createElement('script');
script1.src = '/echarts-master/echarts.min.js';
var script2 = document.createElement('script');
script2.src = '/echarts-master/world.js';
document.head.appendChild(script1);
document.head.appendChild(script2);
document.head.appendChild(script);
function initStyle() {
// 找到目标元素
const navBan = document.querySelector('.nav_ban.rgb_color_background');
if (navBan) {
// 创建一个新的 inner-wrapper div
const innerWrapper = document.createElement('div');
innerWrapper.className = 'inner_nav_ban_wrapper';
// 把 navBan 中所有子节点移动到 innerWrapper 中
while (navBan.firstChild) {
innerWrapper.appendChild(navBan.firstChild);
}
// 再把 innerWrapper 加回 navBan 中
navBan.appendChild(innerWrapper);
}
}
function guest_title() {
var special_id = '';
// 获取地址栏信息
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var Gu_Num = getQueryString('Gu_num'); //客座信息
var Jour_num = getQueryString('J_num'); //
// 相关期刊,过往分期
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getJournal',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
Journals_color = result.data.journal.system_color
$('.border_title').css({
'border-bottom': `1px solid ${Journals_color}`,
})
$('.border_title_top').css({
'border-top': `3px solid ${Journals_color}`,
})
$('.article_info_box .tradition-box .tradition-text .article_info_Highlights').css({
'color': `${Journals_color} !important`,
})
//
// initJournalBaseInfo(result)
}
}
})
$.ajax({
type: 'post', url: apiUrl + 'api/Supplementary/getSpecialIssue',
data: {
'journal_id': Jour_num,
},
success: function (result) {
console.log('result at line 194:', result)
if (result.status !== 1) return ShowDanger("请求失败!");
var specialsList = result.data;
var str = `
<h1 class="oae_header_tit" style="
">Ongoing Special Topics</h1>
`;
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
specialsList.forEach(function(spe) {
// 1. 处理日期
var day = spe.deadline.substring(8, 10);
var monthIdx = parseInt(spe.deadline.substring(5, 7)) - 1;
var year = spe.deadline.substring(0, 4);
var formattedDate = `${day} ${monthNames[monthIdx]} ${year}`;
// 2. 处理编辑信息
var editorsStr = spe.editor?spe.editor: '';
// 3. 判断是否需要隐藏投稿图标 (2022年以前)
var isExpired = parseInt(year) < 2022;
var displayStyle = isExpired ? 'display:none;' : '';
var targetPage = ($.cookie("username") && $.cookie("user_id")) ? 'contribu_list.html' : 'contribu_login.html';
// 4. 拼接字符串
str += `
<div class="special-topic-item">
<div class="special-img-box">
<a href="gue_cont.html?J_num=${Jour_num}&Gu_num=${spe.journal_special_id}" target="_blank">
<img src="${imgjourUrl + spe.icon}" alt="${spe.title}" class="topic-poster">
</a>
</div>
<div class="special-info-box">
<h3 class="topic-title" style="margin:0;"> <a class="topic-title" href="gue_cont.html?J_num=${Jour_num}&Gu_num=${spe.journal_special_id}" target="_blank">
${spe.title}
</a></h3>
<p class="topic-editors">${editorsStr}</p>
<div class="info-row">
<span class="info-label">Submission deadline:</span>
<span class="info-value">${formattedDate}</span>
</div>
<div class="info-row" style="${displayStyle}">
<span class="info-label">Submission information:</span>
<div class="upload-link Submission_information" data-id="${spe.journal_special_id}" style="cursor:pointer; display:inline-block; margin-left:5px; color:${Journals_color}">
<a style="color:${Journals_color}" href="${targetPage}?J_num=${Jour_num}&Gu_num=${spe.journal_special_id}" target="_blank"> <i class="fa fa-upload"></i></a>
</div>
</div>
</div>
</div>`;
});
$('.specials_container').html(str);
// $('.specials_container').off('click', '.Submission_information').on('click', '.Submission_information', function () {
// var sId = $(this).data('id');
// var targetPage = ($.cookie("username") && $.cookie("user_id")) ? 'contribu_list.html' : 'contribu_login.html';
// window.open(`${targetPage}?J_num=${Jour_num}&special_id=${sId}`);
// });
},
error: function () {
ShowDanger("error");
}
})
}
function initJournalBaseInfo(result) {
//头部左侧期刊信息issn+img
var arr_jour = result.data.journal;
console.log('arr_jour at line 1409:', arr_jour)
}
// 列表
let citationCache = null; // 你可以存在全局变量、Vue data 或其他位置
// 时间戳格式化
function timestampToTime(str) {
//str = str * 1000
var oDate = new Date(str * 1000),
oYear = oDate.getFullYear(),
oMonth = oDate.getMonth() + 1,
oDay = oDate.getDate(),
oHour = oDate.getHours(),
oMin = oDate.getMinutes(),
oSen = oDate.getSeconds(),
oTime = oYear + '-' + getzf(oMonth) + '-' + getzf(oDay) + ' ' + getzf(oHour) + ':' +
getzf(oMin) + ':' + getzf(oSen);//最后拼接时间
return oTime;
};
//补0操作
function getzf(num) {
if (parseInt(num) < 10) {
num = '0' + num;
}
return num;
}
function picPreview(src) {
console.log(src)
$('.PicPreview img').attr('src', src)
$('.PicPreview').show()
}
$('.PicPreview').on('click', function () {
$('.PicPreview').hide()
})
function showPopup(title, content, type) {
$('#common-popup .common-popup-title').html(title)
$('#common-popup .common-popup-content').html(content)
document.getElementById('common-overlay').style.display = 'block';
if (type == 'Authorship') {
document.getElementById('common-popup').style.width = 'auto';
renderMap(190)
}
document.getElementById('common-popup').style.opacity = '1';
document.getElementById('common-overlay').style.zIndex = '1000';
document.getElementById('common-popup').style.zIndex = '1001';
// 5秒后自动关闭
// setTimeout(closePopup, 5000);
}
function closePopup() {
document.getElementById('common-popup').style.opacity = '0';
document.getElementById('common-popup').style.zIndex = '-1';
setTimeout(function () {
document.getElementById('common-overlay').style.display = 'none';
$('#common-popup .common-popup-title').html('')
$('#common-popup .common-popup-content').html('')
}, 50);
}

View File

@@ -34,12 +34,12 @@ function commonInit() {
function commonGetItemHtml(doc, maxwidth) {
var data = doc.data; var journal_id = doc.data.journal_id ? doc.data.journal_id : Jour_num;
console.log('journal_id at line 36:', journal_id)
var i = doc.i;
var img_i = doc.img_i;
var c_t_a = doc.c_t_a;
var tong_geogle = doc.tong_geogle;
console.log('img_i at line 31:', img_i)
var baseInfo = {
doi_: !data.doi ? '' : `https://doi.org/${data.doi}`,
npp_: data.npp == '' || data.npp == ' ' ? '' : `:&nbsp;${data.npp}.&nbsp;&nbsp;`,

View File

@@ -36,6 +36,14 @@ targetImgs.forEach(img => {
});
// 期刊基础信息
var arr_jour = result.data.journal;
localStorage.setItem("Journals_title", arr_jour.title);
localStorage.setItem("submission_url", arr_jour.submission_url);
localStorage.setItem("journalAbs", JSON.stringify(result.data.journalAbs));
localStorage.setItem("journalStageID", result.data.journalStage[0].journal_stage_id);
localStorage.setItem("Journals_issn", arr_jour.issn);
localStorage.setItem("Journals_color", arr_jour.system_color);
localStorage.setItem("Journals_usx", arr_jour.usx);
$('h4.rgb_color').css('color', arr_jour.system_color);
$('.home_logo>span').css('color', arr_jour.system_color);
$('.whitebg h4').css('color', arr_jour.system_color);
@@ -268,13 +276,7 @@ targetImgs.forEach(img => {
$('.press-button > div >a').css('height', '32px')
}
localStorage.setItem("Journals_title", arr_jour.title);
localStorage.setItem("submission_url", arr_jour.submission_url);
localStorage.setItem("journalAbs", JSON.stringify(result.data.journalAbs));
localStorage.setItem("journalStageID", result.data.journalStage[0].journal_stage_id);
localStorage.setItem("Journals_issn", arr_jour.issn);
localStorage.setItem("Journals_color", arr_jour.system_color);
localStorage.setItem("Journals_usx", arr_jour.usx);
//几个按钮的链接
if (Jour_num == 1 || Jour_num == 25) {
@@ -294,7 +296,7 @@ targetImgs.forEach(img => {
}
//bmec
if (Jour_num == 25) {
$('.edit_board_tmr').after('<p><b>CiteScore (Scopus):</b> <span>1.7</span></p>');
$('.edit_board_tmr').after('<p><b>CiteScore (Scopus):</b> <span>1.8</span></p>');
}
//$('.edit_board_tmr>a').attr('href', 'notice.html?J_num=' + Jour_num + '&footer_id=' + arr_jour.board_url);