Files
journal_com/jsb/jsp.js
2025-11-03 14:55:33 +08:00

970 lines
41 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 增加访问次数
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: {'type': Jour_num},
success: function (result) {
if (result.code == 0) {
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
// ShowDanger("error");
}
});
// 添加订阅按钮点击弹出
$('.nav_ban .top_sea .b_Sub').click(function () {
$("#mask").css("height", $(document).height());
$("#mask").css("width", $(document).width());
$("#mask").show();
$(".dingyue").fadeIn();
document.body.addEventListener('touchmove', bodyScroll, false);
$('body').css({'position': 'fixed', "width": "100%"});
})
$(".top .dingyue .mb_close").click(function () {
$("#mask").hide();
$(".dingyue").fadeOut();
document.body.removeEventListener('touchmove', bodyScroll, false);
$("body").css({"position": "initial", "height": "auto"});
});
$(".top .dingyue input.yue_close").click(function () {
$("#mask").hide();
$(".dingyue").fadeOut();
document.body.removeEventListener('touchmove', bodyScroll, false);
$("body").css({"position": "initial", "height": "auto"});
});
$(".top .jour_ts input.tishi_author").click(function () {
$("#mask").hide();
$(".jour_ts").fadeOut();
document.body.removeEventListener('touchmove', bodyScroll, false);
$("body").css({"position": "initial", "height": "auto"});
});
function bodyScroll(event) {
event.preventDefault();
}
// 订阅提交
$(".yue_add").click(function () {
$(".spa").text('');
var add_mess = {};
add_mess.journal_id = localStorage.Journals_num;
add_mess.email = $('#emapl').val();
var S_Dan = '0';
var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
if ($("#emapl").val() == "") {
$(".spa1").text('Please fill in E-mail');
S_Dan = '1';
} else if (!(reg.test($("#emapl").val()))) {
$(".spa1").text('Please fill in properly formatted E-mail');
S_Dan = '1';
}
if (S_Dan == '1') {
ShowDanger("Incomplete information");
} else {
$(".yue_add").addClass("disable");
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Journal/addSubscribeJournal',
data: add_mess,
success: function (result) {
if (result.code == 0) {
$(".dingyue").fadeOut();
$(".dingyue input[type='text']").val('');
$(".yue_add").removeClass("disable");
$(".jour_ts").fadeIn();
} else {
ShowDanger(result.msg);
$(".yue_add").removeClass("disable");
}
},
error: function () {
ShowDanger("error");
$(".yue_add").removeClass("disable");
}
})
}
})
// 话题列表数据
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getJournalTopic',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
// 话题列表
var arr_topic = result.data.topicList;
var str = "";
for (var i = 0; i < arr_topic.length; i++) {
if (arr_topic[i].position == "top") {
for (var j = 0; j < arr_topic[i].children.length; j++) {
if (j == 5) break;
var url_href = '';
if (arr_topic[i].children[j].is_final == '1') {
url_href = '../topic_list.html?J_num=' + Jour_num + '&t_id='
} else (
url_href = '../topic.html?J_num=' + Jour_num + '&t_id='
)
str += '<li><img src="' + imgtopicUrl + arr_topic[i].children[j].icon + '" alt="">' +
'<a target="_blank" href="' + url_href + arr_topic[i].children[j].journal_topic_id + '">' +
'<h3 class="rgb_color">' + arr_topic[i].children[j].title + '</h3></a></li>'
}
break;
}
}
$('.top_ics>div>ul').html(str);
if (Jour_num == 6) {
$('.top_ics ul li h3').css('font-size', '12px');
}
if (Jour_num == 15) {
$('.top_ics ul li').css('height', '195px');
}
if (Jour_num == 20) {
$('.top_ics ul li h3').css('font-size', '15px');
}
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
});
// Highlights文章
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getTopArticle',
data: {
"journal_id": Jour_num,
"pageIndex": '1',
"pageSize": '50'
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.articles;
var str = "";
var p = 0
for (var i = 0; i < arr.length; i++) {
if (arr[i].stage_year >= 2020) {
if (p == 2) break;
p++
str += '<li class="clear"><img src="' + imgarticleUrl + arr[i].icon + '" alt="">' +
'<div class="hl_wenz"><h6>' + arr[i].pub_date + '</h6>' +
'<a target="_blank" href="../article.html?J_num=' + Jour_num + '&a_id=' +
arr[i].article_id + '"><h3 class="rgb_color">' + arr[i].title + '</h3></a>' +
'<div class="hl_con">' + arr[i].abstract + '</div></div></li>'
}
}
$('.crd_top>div>ul').html(str + '<br clear="both">');
$(".crd_top>div>ul .hl_con").each(function () {
var maxwidth = 250;//显示多少字符
if ($(this).text().length > maxwidth) {
$(this).text($(this).text().substring(0, maxwidth));
$(this).text($(this).text().substring(0, maxwidth - $(this).text().split(" ").pop().length));
$(this).html($(this).html() + '...');
}
});
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
// Online First文章
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getOnlineArticle',
data: {
"journal_id": Jour_num, 'pageIndex': '1', 'pageSize': '4'
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.articlelist;
var str = "";
for (var i = 0; i < arr.length; i++) {
if (i == 2) break;
if (arr[i].icon == '') {
var img_i = ''
} else {
var img_i = '<img src="' + imgarticleUrl + arr[i].icon + '" alt="">'
}
str += '<li>' + img_i +
'<div class="of_tit"><h6>' + arr[i].pub_date + '</h6>' +
'<a target="_blank" href="../article.html?J_num=' + Jour_num + '&a_id=' + arr[i].article_id + '">' +
'<h3 class="rgb_color">' + arr[i].title + '</h3></a></div><br clear="both">' +
'<div class="cfp_con">' + arr[i].abstract + '</div></li>'
}
$('.onl_fir>div>ul').html(str);
if (arr == '') {
$('.onl_fir').css('display', 'none')
$('.exp_lore').css('background-image', 'none')
$('.exp_lore ul li').css('box-shadow', '0 0 10px #bdbdbd')
$('.exp_and').css('background-image', 'url("jsb/lr_3.jpg")')
$('.exp_and').css('background-repeat', 'repeat-x')
$('.exp_and').css('background-size', '100% 100%')
$('.rel_ated').css('background-image', 'none')
}
$(".onl_fir>div>ul .cfp_con").each(function () {
var maxwidth = 460;//显示多少字符
if ($(this).text().length > maxwidth) {
$(this).text($(this).text().substring(0, maxwidth));
$(this).text($(this).text().substring(0, maxwidth - $(this).text().split(" ").pop().length));
$(this).html($(this).html() + '...');
}
});
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
// Call for Paper文章
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getJournalCfp',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.cfps;
var str = "";
for (var i = 0; i < arr.length; i++) {
if (i == 4) break;
str += '<li><img src="' + imgcfpUrl + arr[i].icon + '" alt=""><h6>' + arr[i].showtime + '</h6>' +
'<a target="_blank" href="../notice.html?J_num=' + Jour_num + '&cfp_id=' +
arr[i].journal_cfp_id + '"><h3 class="rgb_color">' + arr[i].title + '</h3></a>' +
'<div class="cfp_con">' + arr[i].content + '</div></li>'
}
$('.exp_lore>div>ul').html(str);
$(".exp_lore>div>ul .cfp_con").each(function () {
var maxwidth = 130;//显示多少字符
if ($(this).text().length > maxwidth) {
$(this).text($(this).text().substring(0, maxwidth));
$(this).text($(this).text().substring(0, maxwidth - $(this).text().split(" ").pop().length));
$(this).html($(this).html() + '...');
}
});
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
// 下面新增加社区内容
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getAllTopics',
data: {},
beforeSend: function () {
},
success: function (result) {
if (result.code == 0) {
var old_arry = result.data.topic;
var new_arry = result.data.topic;
new_arry = old_arry.map(o => {
return {id: o.base_topic_id, text: o.title}
})
for (var i = 0; i < old_arry.length; i++) {
new_arry[i].children = old_arry[i].children.map(o => {
return {id: o.base_topic_id, text: o.title}
})
}
$('#com_index').selectivity({
allowClear: true,
items: new_arry,
placeholder: 'Please select a topic'
})
$('.es_serch_btn').click(function () {
$('.es_serch_span').css('display', 'none')
if ($('#com_index').selectivity('val') == null) {
$('.es_serch_span').css('display', 'block')
// ShowDanger("Request was aborted");
} else {
window.open("atr_wisdom.html?&wis_dom=" + $('#com_index').selectivity('val'));
}
})
// 期刊订阅提交
$(".uity_Sub").click(function () {
$(".spa_su").text('');
var add_mess = {};
add_mess.journal_id = localStorage.Journals_num;
add_mess.email = $(".uity_inp").val();
var S_Dan = '0';
var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
if ($(".uity_inp").val() == "") {
$(".spa_su").text('Please fill in E-mail');
S_Dan = '1';
} else if (!(reg.test($(".uity_inp").val()))) {
$(".spa_su").text('Please fill in properly formatted E-mail');
S_Dan = '1';
}
if (S_Dan == '1') {
// ShowDanger("Incomplete information");
} else {
$(".uity_Sub").addClass("disable");
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Journal/addSubscribeJournal',
data: add_mess,
success: function (result) {
if (result.code == 0) {
$(".suity_for input[type='text']").val('');
$(".uity_Sub").removeClass("disable");
$(".jour_ts").fadeIn();
} else {
// ShowDanger(result.msg);
$(".uity_Sub").removeClass("disable");
}
},
error: function () {
// ShowDanger("error");
$(".yue_addw").removeClass("disable");
}
})
}
})
} else {
// ShowDanger("请求失败!");
}
}
})
// 社区下面期刊搜索
$('.hunt_for .hunt_btn').click(function () {
window.open("jour_search.html?J_num=" + Jour_num + "&se_ch=" + $(".hunt_for .hunt_inp").val());
})
// footer
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getFooter',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.footers;
var str = "";
for (var i = 0; i < arr.length; i++) {
str += '<ul><h3>' + arr[i].title + '</h3>'
for (var j = 0; j < arr[i].articles.length; j++) {
str += '<li><a href="../notice.html?J_num=' + Jour_num + '&footer_id=' + arr[i].articles[j].journal_paper_art_id + '" target="_blank" target="_blank">' + arr[i].articles[j].title + '</a></li>'
}
str += '</ul>'
}
str += '<ul><h3>TMR Publishing Group</h3>' +
'<li><a href="../atr_wisdom.html?&wis_dom=0" target="_blank" target="_blank">Journals</a></li>' +
'<li><a href="../z_f4-1.html" target="_blank">About Us</a></li>' +
'<li><a href="../z_f4-4.html" target="_blank">Contact Us</a></li>' +
'<li><a href="../z_f4-5.html" target="_blank">ORCID</a></li>' +
'<li><a href="../z_f4-6.html" target="_blank">Crossref</a></li>' +
'<li><a href="../agree.html" target="_blank">Privacy Policy</a></li></ul>'
$('.footer .daohang').html(str);
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
// ShowDanger("error");
}
})
// 基本信息 相关期刊 外链列表数据
var jour_img = ''
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getJournal',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
// 基本信息
var arr_jour = result.data.journal;
jour_img = imgjourUrl + arr_jour.icon;
$('.ex_fem img').attr("src", imgjourUrl + arr_jour.icon)
$('.exp_journal .mes_issn').html(arr_jour.issn);
$('.exp_journal .mes_edit').html(arr_jour.editorinchief);
$('.exp_journal .mes_accep').html(arr_jour.acceptance);
$('.exp_journal .mes_final').html(arr_jour.finaldecision);
$('.exp_journal .mes_APC').html(arr_jour.apc);
if (Jour_num == 3 || Jour_num == 2 || Jour_num == 16 || Jour_num == 18 || Jour_num == 7||Jour_num == 24||Jour_num == 17) {
$('.exp_and .exp_journal .share_4').css('display', 'inline-block');
$('.exp_and .exp_journal .share_5').css('display', 'inline-block');
$('.exp_and .exp_journal .share_6').css('display', 'inline-block');
}
// 出版周期匹配
if (arr_jour.cycle == 1) {
arr_jour.cycle_ = 'Monthly'
} else if (arr_jour.cycle == 2) {
arr_jour.cycle_ = 'Bimonthly'
} else if (arr_jour.cycle == 3) {
arr_jour.cycle_ = 'Quarterly'
}
if (Jour_num == 2 || Jour_num == 17 || Jour_num == 18) {
arr_jour.cycle_ = 'Continuities'
}
$('.exp_journal .mes_cycle').html(arr_jour.cycle_); // 出版周期
$('.exp_journal .mes_ema').html(arr_jour.email);
//几个按钮的链接
if (Jour_num == 1 || Jour_num == 25) {
$('#kezuoBLine').css('display', 'block');
$('#kezuoB').css('display', 'block');
}
$('.Subm_System').attr('href', arr_jour.submission_url);
$('.About_Journal').attr('href', 'about_journal.html?J_num=' + Jour_num);
$('.Ins_authors').attr('href', 'Ins_authors.html?J_num=' + Jour_num);
$('.Join_Bord').attr('href', 'z_f6-1.html?J_num=' + Jour_num);
$('.Join_Bord2').attr('href', 'z_f11-1.html?J_num=' + Jour_num);
// 分期信息
var arr_stage = result.data.journalStage;
var sty = "";
for (var i = 0; i < arr_stage.length; i++) {
if (arr_stage[i].stage_no == 0) {
var Issue_num = '<br/>'
} else {
var Issue_num = ' Issue.' + arr_stage[i].stage_no + '&nbsp;'
}
if (i == 0) {
sty += '<li><b>' + arr_stage[i].stage_year + '</b>' +
'<a target="_blank" href="../article_list.html?J_num=' + Jour_num + '&y_id=' + arr_stage[i].journal_stage_id + '">'
+ arr_stage[i].stage_year + ' Vol.' + arr_stage[i].stage_vol + Issue_num
+ arr_stage[i].stage_pagename + arr_stage[i].stage_page + '</a>'
}
if (i > 0) {
if (i == arr_stage.length - 1) {
if (arr_stage[i].stage_year == arr_stage[i - 1].stage_year) {
sty += '<a target="_blank" href="../article_list.html?J_num=' + Jour_num + '&y_id=' + arr_stage[i].journal_stage_id + '">'
+ arr_stage[i].stage_year + ' Vol.' + arr_stage[i].stage_vol + Issue_num
+ arr_stage[i].stage_pagename + arr_stage[i].stage_page + '</a></li>'
} else {
sty += '</li><li><b>' + arr_stage[i].stage_year + '</b>' +
'<a target="_blank" href="../article_list.html?J_num=' + Jour_num + '&y_id=' + arr_stage[i].journal_stage_id + '">'
+ arr_stage[i].stage_year + ' Vol.' + arr_stage[i].stage_vol + Issue_num
+ arr_stage[i].stage_pagename + arr_stage[i].stage_page + '</a></li>'
}
} else if (arr_stage[i].stage_year != arr_stage[i - 1].stage_year) {
sty += '</li><li><b>' + arr_stage[i].stage_year + '</b>' +
'<a target="_blank" href="../article_list.html?J_num=' + Jour_num + '&y_id=' + arr_stage[i].journal_stage_id + '">'
+ arr_stage[i].stage_year + ' Vol.' + arr_stage[i].stage_vol + Issue_num
+ arr_stage[i].stage_pagename + arr_stage[i].stage_page + '</a>'
} else {
sty += '<a target="_blank" href="../article_list.html?J_num=' + Jour_num + '&y_id=' + arr_stage[i].journal_stage_id + '">'
+ arr_stage[i].stage_year + ' Vol.' + arr_stage[i].stage_vol + Issue_num
+ arr_stage[i].stage_pagename + arr_stage[i].stage_page + '</a>'
}
}
}
$('.exp_issues>ul').html(sty);
if ($('.exp_issues>ul li').length > 4) {
$('.exp_issues>ul li:nth-child(4)').nextAll().remove();
}
// 相关期刊
var arr = result.data.relats;
var str = "";
for (var i = 0; i < arr.length; i++) {
str += '<li><a href="../' + arr[i].usx + '" target="_blank">' +
'<img src="' + imgjourUrl + arr[i].icon + '" alt=""></a></li>'
}
$('.rel_ated>div>ul.related').html(str);
// 外链列表数据
var arr_Abc = result.data.journalAbs;
var sgr = "";
for (var i = 0; i < arr_Abc.length; i++) {
sgr += '<li>»&nbsp;<a target="_blank" href="' + arr_Abc[i].url + '">' + arr_Abc[i].title + '</a></li>'
}
if (result.data.journalAbs.length <= '7') {
$('.exp_and div.indexing ul').html(sgr);
} else {
$('.exp_and div.indexing ul').html(sgr + '<a class="wl_click">more <i class="fa fa-long-arrow-down"></i></a>');
$('.exp_and div.indexing ul li:gt(6)').hide();
}
$(".wl_click").bind('click', function () {
if ($(".wl_click").html() == 'more <i class="fa fa-long-arrow-up"></i>') {
$('.exp_and div.indexing ul li:gt(6)').hide();
$('.wl_click').html('more <i class="fa fa-long-arrow-down"></i>');
} else {
$('.exp_and div.indexing ul li:gt(6)').show();
$('.wl_click').html('more <i class="fa fa-long-arrow-up"></i>');
}
});
if (arr_jour.journal_id == '18') {
$('.exp_and .exp_issues ul li').css('margin-right', '0')
$('.exp_and > div > div').css('margin-right', '20px')
$('.exp_issues').css('margin-right', '0')
}
if (arr_jour.journal_id == '2') {
$('.exp_and .exp_issues ul li').css('margin-right', '14px')
}
if (arr_jour.journal_id == '16') {
$('.exp_and .exp_issues').css('margin-right', '26px')
}
if (arr_jour.journal_id == '12') {
$('.exp_and .exp_issues').css('margin-right', '40px')
}
// $('.rgb_color').css('color',arr_jour.system_color);//颜色
// $('.rgb_ground').css('background-color',arr_jour.system_color);//背景
// $('.carousel-indicator-dots > ul > li.dots-active').css('border-color',arr_jour.system_color);
// $('.carousel-indicator-dots > ul > li.dots-active').css('background-color',arr_jour.system_color);
// $('.among ul h2').css('color',arr_jour.system_color);
// $('.among ul h3').css('color',arr_jour.system_color);
// $('.among ul h6').css('color',arr_jour.system_color);
// $('.exp_and .exp_issues ul li a').css('color',arr_jour.system_color);
// $('.footer .daohang ul li a').css('color',arr_jour.system_color);
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
// Current Issue
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getJournalArticles',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var atg = result.data.stage;
//$('.cur_ent h2 span').html('<a href="../article_list.html?J_num=' + Jour_num + '&y_id=' + atg.journal_stage_id + '" target="_blank">' + atg.issue_date + ', Volume ' + atg.stage_vol + ' Issue ' + atg.stage_no + '</a>');
//var act_year = '' + atg.stage_year + ', ' + atg.stage_vol + '(' + atg.stage_no + ')';
if (Jour_num == 2) {
$('.cur_ent h2').html('Current Volume<span></span>')
}
if (atg.stage_no == 0) {
$('.cur_ent h2 span').html('<a href="../article_list.html?J_num=' + Jour_num + '&y_id=' + atg.journal_stage_id + '" target="_blank">' + atg.issue_date + ', Volume ' + atg.stage_vol + '</a>');
var act_year = '' + atg.stage_year + ', ' + atg.stage_vol;
} else {
$('.cur_ent h2 span').html('<a href="../article_list.html?J_num=' + Jour_num + '&y_id=' + atg.journal_stage_id + '" target="_blank">' + atg.issue_date + ', Volume ' + atg.stage_vol + ' Issue ' + atg.stage_no + '</a>');
var act_year = '' + atg.stage_year + ', ' + atg.stage_vol + '(' + atg.stage_no + ')';
}
var arr = result.data.articleList;
var list_leng = arr.length
// if(arr.length%2!=0){
// list_leng = arr.length-1
// }
var str = "";
var lun_str = "";
for (var i = 0; i < list_leng; i++) {
if (arr[i].file_html == '') {
var html_ = ''
} else {
var html_ = '<img src="img/link_2.png" width="14" height="16"><a href="' + imgFileUrl + 'articleHTML/' + arr[i].file_html + '" target="_blank" class="txt_html" alt="' + arr[i].article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + arr[i].html_num + '</span>&nbsp;)&nbsp;&nbsp;&nbsp;'
}
if (arr[i].file_pdf == '') {
var pdf_ = ''
} else {
var pdf_ = '<img src="img/link_3.jpg" width="14" height="16"><a href="' + imgFileUrl + 'articlePDF/' + arr[i].file_pdf + '" target="_blank" class="txt_pdf" alt="' + arr[i].article_id + '">PDF</a>&nbsp;(&nbsp;<span style="color: red">' + arr[i].pdf_num + '</span>&nbsp;)'
}
if ((Math.round(Date.parse(new Date()) / 1000) - arr[i].ctime) / 86400 >= 21) {
var tong_geogle = '<a href = "https://scholar.google.com/scholar?&q=' + arr[i].title.replace('<i>', '').replace('</i>', '').replace(new RegExp('"', "g"), '') + '"' +
'target = "_blank" style="color: ' + localStorage.Journals_color + ';margin-left: 10px;font-weight: 600;"> ' +
'Google Scholar</a>' //搜索引用次数
} else {
var tong_geogle = '' //少于21天隐藏
}
var link_ = '<img src="img/link_1.png" width="14" height="16">' + '<a target="_blank" href="../article.html?J_num=' + Jour_num + '&a_id=' + arr[i].article_id + '"><font>Abstract</font></a>&nbsp;(&nbsp;<span style="color: red">' + arr[i].abs_num + '</span>&nbsp;)&nbsp;&nbsp;&nbsp;' + html_ + pdf_ + tong_geogle
str += '<li><h5><b>' + arr[i].type + '</b> | ' + act_year + ', ' + arr[i].npp + '<div class="links_">' + link_ + '</div></h5>' +
'<a target="_blank" href="../article.html?J_num=' + Jour_num + '&a_id=' + arr[i].article_id + '">' +
'<h2 class="rgb_color">' + arr[i].title + '</h2></a><div class="clear" style="width: 100%">' +
'<img src="' + imgarticleUrl + arr[i].icon + '" alt="">' +
'<div class="cfp_con">' + arr[i].abstract + '</div></div><h4>' + arr[i].authortitle + '</h4></li>'
}
$('.cur_ent>div>ul').html(str);
$(".cur_ent>div>ul .cfp_con").each(function () {
var maxwidth = 290;//显示多少字符
if ($(this).text().length > maxwidth) {
$(this).text($(this).text().substring(0, maxwidth));
$(this).text($(this).text().substring(0, maxwidth - $(this).text().split(" ").pop().length));
$(this).html($(this).html() + '...');
}
});
$('.cur_ent .txt_zhaiyao').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: {"article_id": $(this).attr('alt'), "type": 'abs'},
success: function (result) {
if (result.code == 0) {
num = num * 1 + 1 * 1
}
}
})
$(this).next().html(num);
})
$('.cur_ent .txt_html').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: {"article_id": $(this).attr('alt'), "type": 'html'},
success: function (result) {
if (result.code == 0) {
num = num * 1 + 1 * 1
}
}
})
$(this).next().html(num);
})
$('.cur_ent .txt_pdf').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: {"article_id": $(this).attr('alt'), "type": 'pdf'},
success: function (result) {
if (result.code == 0) {
num = num * 1 + 1 * 1
}
}
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: {'type': Jour_num, 'is_detail': '1'},
success: function (result) {
}
});
$(this).next().html(num);
})
if (Jour_num == 2 || Jour_num == 12 || Jour_num == 16 || Jour_num == 15 || Jour_num == 7 || Jour_num == 6 || Jour_num == 10 || Jour_num == 24||Jour_num == 17) {
$('.cur_ent ul li').css('height', '336px');
}
if (Jour_num == 13) {
$('.cur_ent ul li').css('height', '350px');
}
if (Jour_num == 6 || Jour_num == 13) {
var xikan = {}
if (Jour_num == 6) {
xikan.topic_id = '339';
xikan.pageIndex = 1;
xikan.pageSize = 10
} else if (Jour_num == 13) {
xikan.topic_id = '363';
xikan.pageIndex = 1;
xikan.pageSize = 10
}
// 轮播
$.ajax({
type: 'post', url: apiUrl + 'api/Article/getTopicArticles',
data: xikan,
success: function (result) {
if (result.code == 0) {
var arl = result.data.articleList;
for (var j = 0; j < arl.length; j++) {
if (j == 1) break;
if (arl[j].subtitle != '') {
var new_titel = arl[j].subtitle
} else {
var new_titel = arl[j].title
}
if (arl[j].rotation != '') {
var new_pic = '<img src="' + imgrotaUrl + arl[j].rotation + '"/>'
} else {
var new_pic = '<img src="' + imgarticleUrl + arl[j].icon + '"/>'
}
lun_str += '<div class="swiper-slide">' + new_pic + '<div class="di_con"><h3><a href="../article.html?J_num=' + Jour_num + '&a_id=' + arl[j].article_id + '" target="_blank">' +
new_titel + '</a></h3><p>' + arl[j].authortitle + ' | ' + arl[j].stage_year + '</p></div></div>'
// lun_str += '<li>' + new_pic + '<div class="di_con"><h3><a href="../article.html?J_num=' + Jour_num + '&a_id=' + arl[j].article_id + '" target="_blank">' +
// new_titel + '</a></h3><p>' + arl[j].authortitle + ' | ' + arl[j].stage_year + '</p></div></li>'
}
$('.banner .swiper-wrapper').html(lun_str);
//期刊轮播
new Swiper('.banner .swiper-container', {
direction: 'horizontal', //默认horizontal, 水平轮播
// autoplay: {//自动切换
// disableOnInteraction: false,
// delay:3000,
// },
loop: true, //循环
slidesPerGroup: 1, // 多少列为一组
slidesPerView: "1", //默认1, 同时显示的slides数量,auto 代表根据轮播图的宽度排列
observer: true,//修改swiper自己或子元素时自动初始化swiper
observeParents: true,//修改swiper的父元素时自动初始化swiper
spaceBetween: 1, //轮播图之间的间距
// pagination: {
// el: '.swiper-pagination',
// clickable:true,
// },
// autoplayDisableOnInteraction : false,
// // 如果需要前进后退按钮
// navigation: {
// nextEl: '.banner .swiper-button-next',
// prevEl: '.banner .swiper-button-prev',
// },
})
// $('.banner .swiper-pagination-bullet.swiper-pagination-bullet-active').css('background-color', localStorage.getItem('Journals_color'));
if (Jour_num == 6) {
$('.banner .di_con').css('padding-top', '5px')
$('.banner .di_con h3 a').css('font-size', '30px')
$('.banner .di_con h3 a').css('line-height', '26px')
}
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
} else {
// 轮播
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getNewsArticle',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var arl = result.data.articlelist;
for (var j = 0; j < arl.length; j++) {
if (j == 1) break;
if (arl[j].subtitle != '') {
var new_titel = arl[j].subtitle
} else {
var new_titel = arl[j].title
}
if (arl[j].rotation != '') {
var new_pic = '<img src="' + imgrotaUrl + arl[j].rotation + '"/>'
} else {
var new_pic = '<img src="' + imgarticleUrl + arl[j].icon + '"/>'
}
lun_str += '<div class="swiper-slide">' + new_pic + '<div class="di_con"><h3><a href="../article.html?J_num=' + Jour_num + '&a_id=' + arl[j].article_id + '" target="_blank">' +
new_titel + '</a></h3><p>' + arl[j].authortitle + ' | ' + arl[j].stage_year + '</p></div></div>'
}
$('.banner .swiper-wrapper').html(lun_str);
//期刊轮播
new Swiper('.banner .swiper-container', {
direction: 'horizontal', //默认horizontal, 水平轮播
// autoplay: {//自动切换
// disableOnInteraction: false,
// delay:3000,
// },
loop: true, //循环
slidesPerGroup: 1, // 多少列为一组
slidesPerView: "1", //默认1, 同时显示的slides数量,auto 代表根据轮播图的宽度排列
observer: true,//修改swiper自己或子元素时自动初始化swiper
observeParents: true,//修改swiper的父元素时自动初始化swiper
spaceBetween: 1, //轮播图之间的间距
// pagination: {
// el: '.swiper-pagination',
// clickable:true,
// },
// autoplayDisableOnInteraction : false,
// // 如果需要前进后退按钮
// navigation: {
// nextEl: '.banner .swiper-button-next',
// prevEl: '.banner .swiper-button-prev',
// },
})
// $('.banner .swiper-pagination-bullet-active').css('background-color', localStorage.getItem('Journals_color'));
if (Jour_num == 15) {
$('.banner .di_con').css('padding-top', '5px')
$('.banner .di_con h3 a').css('font-size', '30px')
$('.banner .di_con h3 a').css('line-height', '26px')
}
if (Jour_num == 18) {
$('.banner .di_con h3 a').css('font-size', '30px')
}
if (Jour_num == 2) {
$('.banner .di_con h3 a').css('font-size', '34px')
}
} else {
// ShowDanger("请求失败!");
$('.ncon_fr').css('display', 'none')
}
},
error: function () {
ShowDanger("error");
}
})
}
// 颜色赋值
$('.rgb_color').css('color', localStorage.Journals_color);//颜色
$('.rgb_ground').css('background-color', localStorage.Journals_color);//背景
// $('.carousel-indicator-dots > ul > li.dots-active').css('border-color',localStorage.Journals_color);
// $('.carousel-indicator-dots > ul > li.dots-active').css('background-color',localStorage.Journals_color);
$('.among ul h2').css('color', localStorage.Journals_color);
$('.among ul h3').css('color', localStorage.Journals_color);
$('.among ul h6').css('color', localStorage.Journals_color);
$('.exp_and .exp_issues ul li a').css('color', localStorage.Journals_color);
// $('.footer .daohang ul li a').css('color',localStorage.Journals_color);
// $('.rgb_color_background .biaot_dh').css('background-color',localStorage.Journals_color);
// 获取地址判断国家跳转
$.ajax({
type: 'post', url: apiUrl + 'api/Main/getIpLocation',
data: {
"ip": returnCitySN["cip"]
},
success: function (result) {
if (result.code == 0) {
var loca_ip = window.location.href.split('/')[2].match(/www.tmrjournals.(.*)/)[1]
if (result.data.country == 'gn') {
if (loca_ip != 'cn') {
window.parent.location.href = "https://www.tmrjournals.cn/" + localStorage.Journals_usx
}
}
if (result.data.country == 'gw') {
if (loca_ip != 'com') {
window.parent.location.href = "https://www.tmrjournals.com/" + localStorage.Journals_usx
}
}
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
// 期刊内搜索
$('.sfor_btn').click(function () {
// console.log($('select[name="cut"] option:selected').val());
window.open("../jour_search.html?J_num=" + Jour_num + "&se_ch=" + $(".sfor_inp").val());
})