tijiao
This commit is contained in:
195
js/article.js
195
js/article.js
@@ -23,6 +23,16 @@ function loadMathJax(callback) {
|
||||
}
|
||||
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 at_list() {
|
||||
|
||||
@@ -7237,7 +7247,24 @@ function getCitations(doi, a_ID) {
|
||||
|
||||
// 文章内容
|
||||
function article_con() {
|
||||
|
||||
|
||||
var newBox = document.querySelector('.newBox');
|
||||
var commonPopupStr = `
|
||||
<div id="common-overlay"></div>
|
||||
<div id="common-popup">
|
||||
<span class="common-close-btn" onclick="closePopup()">×</span>
|
||||
<div style="padding: 30px 30px 20px 30px" class="common-popup-box">
|
||||
<h2 class="common-popup-title"></h2>
|
||||
<div class="common-popup-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
// 将弹窗插入到页面中
|
||||
newBox.insertAdjacentHTML('beforeend', commonPopupStr);
|
||||
|
||||
console.log('js at line 7241:', '是否走了详情js')
|
||||
console.log('详情js', localStorage.Journals_title);
|
||||
@@ -7252,21 +7279,21 @@ function article_con() {
|
||||
var a_ID = getQueryString('a_id'); //文章
|
||||
var htm_ID = getQueryString('s_htm'); //目前显示html
|
||||
const isPre = getQueryString('preview');
|
||||
|
||||
initArticleNavList(a_ID)
|
||||
// 增加访问次数
|
||||
|
||||
if (Jour_num == 1 || Jour_num == 11 || Jour_num == 25) {
|
||||
var CiteScoreStr = ''
|
||||
var marginLeft = 20
|
||||
if (Jour_num == 1) {
|
||||
CiteScoreStr = '1.8';
|
||||
CiteScoreStr = '1.9';
|
||||
marginLeft = 10
|
||||
} else
|
||||
if (Jour_num == 11) {
|
||||
CiteScoreStr = '0.1';
|
||||
CiteScoreStr = '0.3';
|
||||
}
|
||||
else if (Jour_num == 25) {
|
||||
CiteScoreStr = '1.3';
|
||||
CiteScoreStr = '1.5';
|
||||
}
|
||||
if (Jour_num == 1) {
|
||||
// $('#top_bar .nav_ban h2 img').css('zoom','0.75')
|
||||
@@ -7557,9 +7584,10 @@ function article_con() {
|
||||
"article_id": a_ID
|
||||
},
|
||||
timeout: 30000, // 设置超时时间为5秒
|
||||
|
||||
|
||||
|
||||
success: function (result) {
|
||||
// initArticleNavList(a_ID)
|
||||
console.log('result at line 7575:', result)
|
||||
|
||||
|
||||
@@ -8388,12 +8416,12 @@ function article_con() {
|
||||
ShowDanger("请求失败!");
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
ShowDanger("error!");
|
||||
console.log('文章详情error!')
|
||||
console.log('AJAX error:',jqXHR, textStatus, errorThrown); // 输出详细的错误信息
|
||||
console.log('AJAX error:', jqXHR, textStatus, errorThrown); // 输出详细的错误信息
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -9307,4 +9335,155 @@ function getCiteList(a_ID) {
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function initArticleNavList(a_ID) {
|
||||
var Journals_color = localStorage.getItem('Journals_color')
|
||||
var journalStageID = localStorage.getItem('journalStageID')
|
||||
//是否显示地图
|
||||
var isShowAuthorship = 0;
|
||||
if ([1, 14, 8].includes(Number(Jour_num))) {
|
||||
isShowAuthorship = 1
|
||||
}
|
||||
// if (a_ID == 4477) {
|
||||
const style = document.createElement('style');
|
||||
style.innerHTML = `/* 遮罩层 */
|
||||
.article_dropbtn:hover {
|
||||
color: ${Journals_color};
|
||||
|
||||
}
|
||||
.article_dropdown-list a:hover {
|
||||
|
||||
border-bottom:2px solid ${Journals_color};
|
||||
font-weight:bold;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
`;
|
||||
document.head.appendChild(style);
|
||||
|
||||
|
||||
// 获取 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>
|
||||
<p><a href="/stages.html?J_num=${Jour_num}" target="_blank">Archiving</a></p>
|
||||
<p style="${Jour_num == 1 ? 'display:block' : 'display:none'}"><a href="/guest.html?J_num=${Jour_num}" target="_blank">Special Issues</a></p>
|
||||
|
||||
<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>
|
||||
|
||||
<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 = `
|
||||
<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>
|
||||
<!--地图弹窗-->
|
||||
<div class="Authorship" style="position: relative;z-index:10;cursor: pointer;${isShowAuthorship ? 'display:block' : 'display:none'}">
|
||||
|
||||
<p class="Authorship_text"><a href="javascript:;" onclick="openAuthorship(${Jour_num},'${Journals_color}')">Authorship</a></p>
|
||||
|
||||
`
|
||||
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">
|
||||
${otherStr1}
|
||||
</div>
|
||||
</div>
|
||||
<div class="article_dropdown-menu">
|
||||
<div class="article_dropbtn">About Journal <i class="fa fa-chevron-down" style="font-size: 14px;margin-left: 6px;"></i></div>
|
||||
<div class="article_dropdown-list" style="min-width:180px">
|
||||
${otherStr2}
|
||||
</div>
|
||||
</div>
|
||||
<div class="article_dropdown-menu">
|
||||
<div class="article_dropbtn">Publish <i class="fa fa-chevron-down" style="font-size: 14px;margin-left: 6px;"></i></div>
|
||||
<div class="article_dropdown-list" style="min-width:250px">
|
||||
${otherStr3}
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
// 使用 insertAdjacentHTML 在 top_bar 后插入新元素
|
||||
topBar.insertAdjacentHTML('afterend', str);
|
||||
|
||||
// JavaScript to handle dropdown toggle on button click
|
||||
|
||||
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
function openAbstracting(Jour_num, Journals_color) {
|
||||
var list = localStorage.getItem('journalAbs')
|
||||
var arr_Abc = JSON.parse(list).filter(e => e.is_show == 1);
|
||||
var Abstractingcontent = `<ul style="margin-top:10px;">
|
||||
${arr_Abc.map((item, i) => {
|
||||
return `<li style="font-weight:700;font-size:14px;"><span style="display:inline-block">» </span><a target="_blank" href="${item.url}" style="font-weight:700;display:inline-block">${item.title}</a></li>`;
|
||||
}).join('')}
|
||||
</ul>`
|
||||
document.querySelector('#common-popup .common-popup-content').classList.add('whitebg');
|
||||
showPopup(`<span style="font-weight:bold;color:${Journals_color}">Abstracting & Indexing</span>`, Abstractingcontent)
|
||||
|
||||
|
||||
|
||||
|
||||
// 5秒后自动关闭
|
||||
// setTimeout(closePopup, 5000);
|
||||
}
|
||||
function openAuthorship(Jour_num, Journals_color) {
|
||||
|
||||
var Abstractingcontent = `
|
||||
<div class="tmr_side_map AuthorshipInfo" style="
|
||||
width:300px;margin-top:20px">
|
||||
<div id="worldMap" style="width: 100%;height: 140px;margin: 0 auto 10px auto"></div>
|
||||
<ul class="map_paiming" style="padding: 0 20px 10px 20px;"></ul>
|
||||
</div>
|
||||
</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')
|
||||
|
||||
|
||||
|
||||
|
||||
// 5秒后自动关闭
|
||||
// setTimeout(closePopup, 5000);
|
||||
}
|
||||
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-popup').style.zIndex = '101';
|
||||
|
||||
// 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);
|
||||
}
|
||||
@@ -8,4 +8,45 @@ function initForAuthor(Jour_num, arr_jour) {
|
||||
}
|
||||
|
||||
$('.for_mess div .fr_APC').html(apcStr);
|
||||
|
||||
}
|
||||
function initForAuthorHtml(Jour_num, arr_jour) {
|
||||
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'api/Journal/getForAuthors',
|
||||
data: { 'journal_id': Jour_num },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
var arr = result.data.forAuthors;
|
||||
var str = "";
|
||||
var sgl = "";
|
||||
for (var i in arr) {
|
||||
str += '<li><a href="javascript:;" class="snf-nav" style="padding:6px 0 6px 27px;"><b>' + arr[i].jfa_title + '</b></a></li>'
|
||||
sgl += '<div class="snf-page"><h3 class="big" style="font-size: 22px;padding-top: 15px;color: rgb(0, 71, 178);">' + arr[i].jfa_title + '</h3></div>'
|
||||
for (var j = 0; j < arr[i].children.length; j++) {
|
||||
str += '<li><a href="javascript:;" class="snf-nav" style="padding:6px 0 6px 27px">' + arr[i].children[j].jfa_title + '</a></li>'
|
||||
|
||||
sgl += '<div class="snf-page"><h3 style="font-size:16px">' + arr[i].children[j].jfa_title + '</h3>' + arr[i].children[j].content + '</div>'
|
||||
}
|
||||
}
|
||||
|
||||
$('#for_nag').html(str);
|
||||
$('#for_nag li:nth-child(1) a').addClass('active');
|
||||
$('#for_main').html(sgl);
|
||||
|
||||
//以window为顶,设置离顶和回调
|
||||
var snf = simpleNavFollow({
|
||||
leaveTop: 10,
|
||||
});
|
||||
|
||||
} else {
|
||||
ShowDanger(result.msg);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
ShowDanger("error!");
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
@@ -257,6 +257,9 @@ function side_list() {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user