This commit is contained in:
wangjinlei
2023-05-18 09:42:12 +08:00
commit 6e7ee3dd44
1214 changed files with 103535 additions and 0 deletions

766
lr/js/jsp.js Normal file
View File

@@ -0,0 +1,766 @@
// 增加访问次数
$.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);
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
});
// Highlights文章
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getTopArticle',
data: {
"journal_id": Jour_num,
"pageIndex": '1',
"pageSize": '30'
},
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')
}
$(".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 choose topics'
})
$('.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("请求失败!");
}
}
})
// 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 (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_); // 出版周期
$('.she_SCom > div:nth-child(4) > p> b').html(arr_jour.title);
// 分期信息
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_ = '<br> Issue.' + arr_stage[i].stage_no
}
sty += '<li>' +
'<img src="' + jour_img + '" alt="">' +
'<a class="rgb_color" 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 + iss_ +
'&nbsp;<br>' + arr_stage[i].stage_pagename + arr_stage[i].stage_page +
'&nbsp;<br><br><span>' + arr_stage[i].issue_date + '</span></a></li>'
}
}
// $('.exp_issues>ul').html(sty);
// 相关期刊
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>');
}
});
//几个按钮的链接
$('.Subm_System').attr('href', arr_jour.submission_url);
$('.About_Journal').attr('href', '../about_journal.html?J_num=' + Jour_num);
$('.Ins_authors').attr('href', '../for_author.html?J_num=' + Jour_num);
$('.Join_Bord').attr('href', '../z_f6-1.html?J_num=' + Jour_num);
// $('.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=14&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].title.length > 130) {
var trad_title = arr[i].tradition_tag
} else {
var trad_title = arr[i].title
}
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">' + trad_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>'
if (arr[i].article_id == '1546' || arr[i].article_id == '1562') {
if (arr[i].subtitle != '') {
var new_titel = arr[i].subtitle
} else {
var new_titel = arr[i].title
}
if (arr[i].rotation != '') {
var new_pic = arr[i].rotation
} else {
var new_pic = arr[i].icon
}
lun_str += '<li class="carousel-item"><img src="' + imgarticleUrl + new_pic + '"/>' +
'<div class="di_con"><h3><a href="../article.html?J_num=14&a_id=' + arr[i].article_id + '" target="_blank">' +
new_titel + '</a></h3><p>' + arr[i].abbr + ' | ' + '2021</p></div></li>'
}
}
$('.cur_ent>div>ul').html(str);
$(".cur_ent>div>ul .cfp_con").each(function () {
var maxwidth = 400;//显示多少字符
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_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);
})
// News & Comment轮播
$.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',
// },
})
} 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);
$('.search_for input').css('border-color', localStorage.Journals_color);
$('.search_for input.sfor_btn').css('background-color', localStorage.Journals_color);
$('.exp_and .exp_issues ul li a').css('color', localStorage.Journals_color);
$('.she_SCom .rgb_color_background').css('background-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/lr"
}
}
if (result.data.country == 'gw') {
if (loca_ip != 'com') {
window.parent.location.href = "https://www.tmrjournals.com/lr"
}
}
} 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());
})
// 社区下面期刊搜索
$('.hunt_for .hunt_btn').click(function () {
window.open("../jour_search.html?J_num="+Jour_num+"&se_ch=" + $(".hunt_for .hunt_inp").val());
})

95
lr/js/lead.js Normal file
View File

@@ -0,0 +1,95 @@
// 地址
// var apiUrl = "http://journal.com/";
// var apiUrlTG = "http://www.tougao.com/";
// var apiUrlImg = "http://journal.com/";
var apiUrl = "/";
var apiUrlTG = "/";
var apiUrlImg = "/public/";
// var apiUrlImg = "http://journalapi.tmrjournals.com/public/";
var imgjourUrl = apiUrlImg + "journalicon/";
var imgtopicUrl = apiUrlImg + "journaltopic/";
var imgarticleUrl = apiUrlImg + "articleicon/";
var imgsystemUrl = apiUrlImg + "system/";
var imglineUrl = apiUrlImg + "journalline/";
var imgcfpUrl = apiUrlImg + "journalCfp/";
var imgFileUrl = apiUrlImg + "";
// 资源
// IMGdoURL = 'http://journalapi.tmrjournals.com/public/'
// IMGupURL = 'http://journal.com/'
// 获取地址栏信息
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;
}
// localStorage.setItem("Journals_num",getQueryString('J_num'));
localStorage.setItem("Journals_num",'14');
localStorage.setItem("Journals_usx",'lr');
localStorage.setItem("Journals_title",'Life Research');
localStorage.setItem("Journals_color",'#1051A2');
localStorage.setItem("Journals_issn",'2624-0548');
// 获取缓存期刊id
var Jour_num = localStorage.Journals_num;
//返回顶部
$.goup({
trigger: 100,
bottomOffset: 150,
locationOffset: 60,
titleAsText: true
});
// 基本信息
function lead_in(){
$.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;
localStorage.setItem("Journals_color",arr_jour.system_color);
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
}

1238
lr/js/type.css Normal file

File diff suppressed because it is too large Load Diff

108
lr/js/unslider.min.js vendored Normal file
View File

@@ -0,0 +1,108 @@
(function (e, t) {
if (!e) return t;
var n = function () {
this.el = t;
this.items = t;
this.sizes = [];
this.max = [0, 0];
this.current = 0;
this.interval = t;
this.opts = {speed: 500, delay: 3e3, complete: t, keys: !t, dots: t, fluid: t};
var n = this;
this.init = function (t, n) {
this.el = t;
this.ul = t.children("ul");
this.max = [t.outerWidth(), t.outerHeight()];
this.items = this.ul.children("li").each(this.calculate);
this.opts = e.extend(this.opts, n);
this.setup();
return this
};
this.calculate = function (t) {
var r = e(this), i = r.outerWidth(), s = r.outerHeight();
n.sizes[t] = [i, s];
if (i > n.max[0]) n.max[0] = i;
if (s > n.max[1]) n.max[1] = s
};
this.setup = function () {
this.el.css({overflow: "hidden", width: n.max[0], height: this.items.first().outerHeight()});
this.ul.css({width: this.items.length * 100 + "%", position: "relative"});
this.items.css("width", 100 / this.items.length + "%");
if (this.opts.delay !== t) {
this.start();
this.el.hover(this.stop, this.start)
}
this.opts.keys && e(document).keydown(this.keys);
this.opts.dots && this.dots();
if (this.opts.fluid) {
var r = function () {
n.el.css("width", Math.min(Math.round(n.el.outerWidth() / n.el.parent().outerWidth() * 100), 100) + "%")
};
r();
e(window).resize(r)
}
if (this.opts.arrows) {
this.el.parent().append('<p class="arrows"><span class="prev">←</span><span class="next">→</span></p>').find(".arrows span").click(function () {
e.isFunction(n[this.className]) && n[this.className]()
})
}
if (e.event.swipe) {
this.el.on("swipeleft", n.prev).on("swiperight", n.next)
}
};
this.move = function (t, r) {
if (!this.items.eq(t).length) t = 0;
if (t < 0) t = this.items.length - 1;
var i = this.items.eq(t);
var s = {height: i.outerHeight()};
var o = r ? 5 : this.opts.speed;
if (!this.ul.is(":animated")) {
n.el.find(".dot:eq(" + t + ")").addClass("active").css("background-color", localStorage.Journals_color).siblings().removeClass("active").css("background-color", '#fff');
this.el.animate(s, o) && this.ul.animate(e.extend({left: "-" + t + "00%"}, s), o, function (i) {
n.current = t;
e.isFunction(n.opts.complete) && !r && n.opts.complete(n.el)
})
}
};
this.start = function () {
n.interval = setInterval(function () {
n.move(n.current + 1)
}, n.opts.delay)
};
this.stop = function () {
n.interval = clearInterval(n.interval);
return n
};
this.keys = function (t) {
var r = t.which;
var i = {37: n.prev, 39: n.next, 27: n.stop};
if (e.isFunction(i[r])) {
i[r]()
}
};
this.next = function () {
return n.stop().move(n.current + 1)
};
this.prev = function () {
return n.stop().move(n.current - 1)
};
this.dots = function () {
var t = '<ol class="dots">';
e.each(this.items, function (e) {
t += '<li class="dot' + (e < 1 ? " active" : "") + '">' + "</li>"
});
t += "</ol>";
this.el.addClass("has-dots").append(t).find(".dot").click(function () {
n.move(e(this).index())
})
}
};
e.fn.unslider = function (t) {
var r = this.length;
return this.each(function (i) {
var s = e(this);
var u = (new n).init(s, t);
s.data("unslider" + (r > 1 ? "-" + (i + 1) : ""), u)
})
}
})(window.jQuery, false)