// 添加订阅按钮点击弹出
// $('.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();
// }
// 增加访问次数
$.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!");
}
});
// 订阅提交
$(".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 {
$(".spa1").text(result.msg);
// 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 = "";
var wh_number = 0;
for (var i = 0; i < arr_topic.length; i++) {
if (arr_topic[i].position == "top") {
wh_number += 1;
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 += '
' +
'' +
'' + arr_topic[i].children[j].title + '
'
}
break;
}
}
$('.top_ics>div>ul').html(str);
if (wh_number == '0') {
$('.top_ics').css('display', 'none')
}
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error!");
}
});
// Highlights文章
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getTopArticle',
data: {
"journal_id": Jour_num,
"pageIndex": '1',
"pageSize": '6'
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.articles;
var str = "";
// if(Jour_num==8){
// for (var i = 0; i < arr.length; i++) {
// if(arr[i].icon==''){var img_i=''}else{var img_i='
'}
// str += ''
// }
// $('.exp_ishgu').html(' ' +
// '' +
// '' +
// 'Archives
');
// $('#Marquee_x').jcMarquee({ 'marquee':'x','speed':20 });
// }else{
for (var i = 0; i < arr.length; i++) {
if (i == 3) break;
if (arr[i].icon == '') {
var img_i = ''
} else {
var img_i = '
'
}
str += '' +
'' + arr[i].title + '
' + img_i + '
'
}
$('.exp_hlig').html(str);
// }
// $('.crd_top h2 a').attr('href','article_list.html?J_num='+Jour_num+'&top_id='+Jour_num);
} 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 == 2) break;
str += '
' + formatTimeToDate4(arr[i].ctime * 1000) +
'
' + arr[i].title + '
' +
'' + arr[i].content + '
'
}
$('.exp_lore>div>ul').html(str);
$('.exp_lore h2 a').attr('href', 'notice_list.html?J_num=' + Jour_num + '&paper_id=' + Jour_num);
if (arr == '') {
$('.exp_lore').css('display', 'none')
}
$(".exp_lore>div>ul .cfp_con").each(function () {
var maxwidth = 400;//显示多少字符
if ($(this).text().length > maxwidth) {
$(this).text($(this).text().substring(0, maxwidth));
$(this).html($(this).html() + '...');
}
});
} 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(atg.issue_date + ', Volume ' + atg.stage_vol + ' Issue ' + atg.stage_no);
var act_year = '' + atg.stage_year + ', ' + atg.stage_vol + '(' + atg.stage_no + ')';
var arr = result.data.articleList;
var str = "";
for (var i = 0; i < arr.length; i++) {
if (arr[i].icon == '') {
var img_i = 'img/baiss.png'
} else {
var img_i = imgarticleUrl + arr[i].icon
}
var abs_ = '
' +
'Abstract ( ' + arr[i].abs_num + ' ) '
if (arr[i].file_html == '') {
var html_ = ''
} else {
var html_ = '
HTML ( ' + arr[i].html_num + ' ) '
}
if (arr[i].file_pdf == '') {
var pdf_ = ''
} else {
var pdf_ = '
PDF ( ' + arr[i].pdf_num + ' )'
}
if ((Math.round(Date.parse(new Date()) / 1000) - arr[i].ctime)/86400 >= 21) {
var tong_geogle = ' ' +
'Google Scholar' //搜索引用次数
} else {
var tong_geogle = '' //少于21天隐藏
}
// if(arr[i].npp==''){var npp_ = ''}else{var npp_ = ': '+ arr[i].npp+'. '}
str += '' + arr[i].type + ' | ' + act_year + ', ' +
result.data.stage.stage_pagename + arr[i].npp + '
' +
'' +
'' + arr[i].title + '
' +
'

' + arr[i].abstract + '
' +
'' + arr[i].abbr + '
' +
abs_ + html_ + pdf_ + tong_geogle + '
'
}
$('.cur_ent>div>ul').html(str);
$(".cur_ent>div>ul .cfp_con").each(function () {
var maxwidth = 420;//显示多少字符
if ($(this).text().length > maxwidth) {
$(this).text($(this).text().substring(0, maxwidth));
$(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);
})
} 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 (arr[i].icon == '') {
var img_i = 'img/baiss.png'
} else {
var img_i = imgarticleUrl + arr[i].icon
}
str += '
' +
'' + arr[i].title + '
'
}
$('.onl_ft>div>ul').html(str);
$('.onl_ft h2 a').attr('href', 'article_list.html?J_num=' + Jour_num + '&o_id=' + Jour_num);
if (arr == '') {
$('.onl_ft').css('display', 'none')
}
} else {
// ShowDanger("请求失败!");
$('.onl_ft').css('display', 'none')
}
},
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'));
}
})
} else {
ShowDanger("请求失败!");
}
}
})
// 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 += ''
}
str += ''
$('.footer .daohang').html(str);
$('.footer .daohang ul li a').css('color', localStorage.Journals_color);
} 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;
$('.exp_and .exp_journal>img').attr("src", imgjourUrl + arr_jour.icon)
$('.exp_and .exp_mess .mes_issn').html(arr_jour.issn);
$('.exp_and .exp_mess .mes_edit').html(arr_jour.editorinchief);
$('.exp_and .exp_mess .mes_accep').html(arr_jour.acceptance);
$('.exp_and .exp_mess .mes_final').html(arr_jour.finaldecision);
$('.exp_and .exp_mess .mes_APC').html(arr_jour.apc);
if (Jour_num == 24) {
$('.exp_and .exp_mess .share_three').css('display', '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_and .exp_mess .mes_cycle').html(arr_jour.cycle_); // 出版周期
$('.dingyue p b').html(arr_jour.title);
$('.nav_ban .biaot_dh>h1>a').html(arr_jour.title);
$('.nav_ban .biaot_dh>h1>a').attr("href", '/' + arr_jour.usx)
$('.top_sys a').attr("href", arr_jour.submission_url)
$('.top_edit').attr("href", 'gue_edit.html?J_num=' + Jour_num)
$('.exp_ishgu p a.more').attr("href", 'stages.html?J_num=' + Jour_num)
$('.footer .dh_dy p b').html(arr_jour.title);//订阅
$('.nav_ban .top_sea .b_Sub').attr('href', 'draw_up.html?issn=' + arr_jour.issn);
$('.she_SCom .rgb_color').css('color', arr_jour.system_color)
$('.she_SCom .rgb_color_background').css('background-color', arr_jour.system_color)
//几个按钮的链接
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);
// 标题加文字
if (arr_jour.title == 'Drug Combination Therapy') {
$('.biaot_dh h1').append('' +
'Collaborative journal between the School of Pharmaceutical Science and Technology of Tianjin University and TMR Publishing Group
');
}
// 分期信息
var arr_stage = result.data.journalStage;
var sty = "";
for (var i = 0; i < arr_stage.length; i++) {
if (arr_stage[i].stage_year == '2021') {
if (arr_stage[i].stage_no == '0') {
var iss_ = ''
} else {
var iss_ = '
Issue.' + arr_stage[i].stage_no
}
sty += '' +
'
' +
'' +
'' + arr_stage[i].stage_year + ' Vol.' + arr_stage[i].stage_vol + iss_ +
'
' + arr_stage[i].stage_pagename + arr_stage[i].stage_page +
'
' + arr_stage[i].issue_date + ''
}
}
$('.exp_issues>ul').html(sty);
$('.exp_issues h3 a').attr('href', 'stages.html?J_num=' + Jour_num);
// 相关期刊
var arr = result.data.relats;
var str = "";
for (var i = 0; i < arr.length; i++) {
str += '' +
'
'
}
$('.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 += '» ' + arr_Abc[i].title + ''
}
if (result.data.journalAbs.length <= '5') {
$('.rel_ated div.indexing ul').html(sgr);
} else {
$('.rel_ated div.indexing ul').html(sgr + 'More ');
$('.rel_ated div.indexing ul li:gt(4)').hide();
}
$(".wl_click").bind('click', function () {
if ($(".wl_click").html() == 'More ') {
$('.rel_ated div.indexing ul li:gt(4)').hide();
$('.wl_click').html('More ');
} else {
$('.rel_ated div.indexing ul li:gt(4)').show();
$('.wl_click').html('More ');
}
});
// News & Comment
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getNewsArticle',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.articlelist;
var sgr = "";
for (var i = 0; i < arr.length; i++) {
if (i == 4) break;
if (arr[i].icon == '') {
var img_i = 'img/baiss.png'
} else {
var img_i = imgarticleUrl + arr[i].icon
}
sgr += '
' +
'' + arr[i].title + '
'
}
$('.new_com>div>ul').html(sgr);
$('.new_com h2 a').attr('href', 'article_list.html?J_num=' + Jour_num + '&n_id=' + Jour_num);
if (arr == '') {
$('.new_com').css('display', 'none')
}
if (Jour_num == 21) {
$('.new_com').css('background', '#fff');
}
// 颜色赋值
$('.rgb_color').css('color', localStorage.Journals_color);//颜色
$('.rgb_ground').css('background-color', localStorage.Journals_color);//背景
$('.among>div>h2').css('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);
$('.rgb_color_background .biaot_dh').css('background-color', localStorage.Journals_color);
// $('.top_sea b').css('color',localStorage.Journals_color);
// $('.top_sea b a').css('color',localStorage.Journals_color);
$('.exp_ishgu p a.more').css("color", localStorage.Journals_color)
$('.search_for input.sfor_inp').css('background-color', localStorage.Journals_color + '26');
$('.search_for input.sfor_btn').css('background-color', localStorage.Journals_color);
$('.search_for input.sfor_btn').css('border-color', localStorage.Journals_color);
$('.top_logo .home_logo span').css('color', localStorage.Journals_color);
// $('.exp_and>div').css('background-color',localStorage.Journals_color+'26');
$('.footer>div').css('background-color', localStorage.Journals_color + '26');
$('.footer .daohang ul li a').css('color', localStorage.Journals_color);
$('.footer .daohang ul h3').css('color', localStorage.Journals_color);
$('.footer .bianma p').css('color', localStorage.Journals_color);
$('.indexing .wl_click').css('color', localStorage.Journals_color);
$('.footer .dh_dy input[type="submit"]').css('background-color', arr_jour.system_color)
$('.footer .dh_dy input[type="submit"]').css('border-color', arr_jour.system_color)
$('input.tishi_author').css('background-color', localStorage.Journals_color);
} else {
// ShowDanger("请求失败!");
$('.ncon_fr').css('display', 'none')
}
},
error: function () {
ShowDanger("error!");
}
})
// $('.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!");
}
})
// 期刊内搜索
$('.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());
})
// 订阅期刊(提交新的)
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getTopicForSubscribe',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.topics;
var data_1 = [];
for (var i = 0; i < arr.length; i++) {
data_1.push({
id: arr[i].journal_topic_id,
text: arr[i].title
});
}
$("#combox1").combox({
id: "id",
name: "text",
data: data_1,
valueChange: function (data) {
// debugger
//返回data,filterData,selectData
}
})
var cb1 = $("#combox1").data('combox');
// 订阅期刊(提交新的)
$(".yue_addf").click(function () {
$(".spa145").text('');
var add_mess = {};
add_mess.email = $('#emaplf').val();
add_mess.topic_ids = [];
var ar_mes = cb1.options.selectData
for (var i = 0; i < ar_mes.length; i++) {
add_mess.topic_ids.push(ar_mes[i]['id']);
}
var S_Dan = '0';
var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
if (cb1.options.selectData == "") {
$(".spa145").text('Please choose topic');
S_Dan = '1';
} else if ($("#emaplf").val() == "") {
$(".spa145").text('Please fill in E-mail');
S_Dan = '1';
} else if (!(reg.test($("#emaplf").val()))) {
$(".spa145").text('Please fill in properly formatted E-mail');
S_Dan = '1';
}
if (S_Dan == '1') {
// ShowDanger("Incomplete information!");
} else {
$(".yue_addf").addClass("disable");
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/addSubscribeTopics',
data: add_mess,
success: function (result) {
if (result.code == 0) {
// $(".dh_by input[type='text']").val('');
$(".yue_addf").removeClass("disable");
$(".jour_ts").fadeIn();
$("input.tishi_author").click(function () {
$(".jour_ts").fadeOut();
});
} else {
ShowDanger(result.msg);
$(".yue_addf").removeClass("disable");
}
},
error: function () {
ShowDanger("error!");
$(".yue_addf").removeClass("disable");
}
})
}
})
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error!");
}
});