// 增加访问次数 $.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 += '
  • ' + '' + '

    ' + arr_topic[i].children[j].title + '

  • ' } 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 += '
  • ' + '
    ' + arr[i].pub_date + '
    ' + '

    ' + arr[i].title + '

    ' + '
    ' + arr[i].abstract + '
  • ' } } $('.crd_top>div>ul').html(str + '
    '); $(".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 = '' } str += '
  • ' + img_i + '
    ' + arr[i].pub_date + '
    ' + '' + '

    ' + arr[i].title + '


    ' + '
    ' + arr[i].abstract + '
  • ' } $('.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 += '
  • ' + arr[i].showtime + '
    ' + '

    ' + arr[i].title + '

    ' + '
    ' + arr[i].content + '
  • ' } $('.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 += '' } str += '' $('.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_ = '
    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); // 相关期刊 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 <= '7') { $('.exp_and div.indexing ul').html(sgr); } else { $('.exp_and div.indexing ul').html(sgr + 'more '); $('.exp_and div.indexing ul li:gt(6)').hide(); } $(".wl_click").bind('click', function () { if ($(".wl_click").html() == 'more ') { $('.exp_and div.indexing ul li:gt(6)').hide(); $('.wl_click').html('more '); } else { $('.exp_and div.indexing ul li:gt(6)').show(); $('.wl_click').html('more '); } }); //几个按钮的链接 $('.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); $('.Join_Bord2').attr('href', '../z_f11-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('' + 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 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_ = '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天隐藏 } var link_ = '' + 'Abstract ( ' + arr[i].abs_num + ' )   ' + html_ + pdf_ + tong_geogle str += '
  • ' + arr[i].type + ' | ' + act_year + ', ' + arr[i].npp + '
    ' + '' + '

    ' + trad_title + '

    ' + '' + '
    ' + arr[i].abstract + '

    ' + arr[i].authortitle + '

  • ' 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 += '' } } $('.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 = '' } else { var new_pic = '' } lun_str += '
    ' + new_pic + '

    ' + new_titel + '

    ' + arl[j].authortitle + ' | ' + arl[j].stage_year + '

    ' } $('.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()); })