// 地址 // var apiUrl = "http://journal.com/"; // var apiUrlTG = "http://www.tougao.com/"; // var apiUrlImg = "http://journal.com/"; var apiUrl = "/"; var apiUrlTG = "/"; var apiUrlImg = "/public/"; var apiSubmission = "https://submission.tmrjournals.com/"; // var apiUrlImg = "http://journalapi.tmrjournals.com/public/"; var imgjourUrl = apiUrlImg + "journalicon/"; var imgtopicUrl = apiUrlImg + "journaltopic/"; var imgbaseUrl = apiUrlImg + "baseTopic/"; 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",'1'); // 获取缓存期刊id var Jour_num = localStorage.Journals_num; // tab选项卡 $(document).ready(function() { $("#tablist li").each(function(index) { $(this).click(function() { $(".contentin").removeClass("contentin"); $(".tabin").removeClass("tabin"); $(".content-box>div").eq(index).addClass("contentin"); $(this).addClass("tabin") }); }) }) //返回顶部 $.goup({ trigger: 100, bottomOffset: 150, locationOffset: 60, titleAsText: true }); // 成功失败弹出层 function ShowSuccess(tiq) { var $tiq = $('#tiq'); if ($tiq.length == 0) { // 设置样式,也可以定义在css文件中 $tiq = $(''); $('body').append($tiq); } $tiq.stop(true).html(''+tiq).css({'margin-left': -$tiq.outerWidth() / 2,'color':'#444','background-color':'#fff'}).fadeIn(500).delay(1500).fadeOut(500); } function ShowDanger(tip) { var $tip = $('#tip'); if ($tip.length == 0) { // 设置样式,也可以定义在css文件中 $tip = $(''); $('body').append($tip); } $tip.stop(true).text(tip).css({'margin-left': -$tip.outerWidth() / 2,'color':'#a94442','background-color':'#fff'}).fadeIn(500).delay(1000).fadeOut(500); } function ShowSubmit(tiq) { var $tiq = $('#tir'); if ($tiq.length == 0) { // 设置样式,也可以定义在css文件中 $tiq = $(''); $('body').append($tiq); } $tiq.stop(true).html(''+tiq).css({'margin-left': -$tiq.outerWidth() / 2,'color':'#444','background-color':'#fff'}).fadeIn(500); } // 点击复制内容 // $('.copyAddr').click(function(){ // var text = $(this).parents("li").children(".authorList").text(); // var input = $(this).parents("li").children(".copy_text"); // input.value = text; // 修改文本框的内容 // console.log(text); // console.log(input.value); // input.select(); // 选中文本 // document.execCommand("Copy"); // 执行浏览器复制命令 // }) //时间 var formatTimeToDate1 = function(time){ return new Date(time).format("yyyy"); }; var formatTimeToDate2 = function(time){ return new Date(time).format("dd/MM/yyyy"); }; var formatTimeToDate3 = function(time){ return new Date(time).format("yyyy-MM-dd hh:mm:ss"); }; var formatTimeToDate4 = function(time){ return new Date(time).format("yyyy-MM-dd"); }; Date.prototype.format = function(format) { var date = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours(), "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), "S+": this.getMilliseconds() }; if (/(y+)/i.test(format)) { format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); } for (var k in date) { if (new RegExp("(" + k + ")").test(format)) { format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k] : ("00" + date[k]).substr(("" + date[k]).length)); } } return format; }; // 头部 $('#top_bar').load('header.html') $('#index_top').load('header_in.html') // 高度一致 function whit_color() { // if($(".art_side").height() > $(".art_main").height()){ // $(".art_main").css("height",$(".art_side").height()); // }else{ // $(".art_side").css("height",$(".art_main").height()); // } } // 图片放大 function imgbig(which){ var imgsrc = $(which).find('img').attr('src'); $("#bigimg").css("display","block"); $("#bigimg").html(""); $('#bigimg>img').css('margin-top',-$('#bigimg>img').height()/2); $('body').css({"overflow-x":"hidden","overflow-y":"hidden"}); } function closeimg() { $("#bigimg").css("display","none"); $('html,body').removeClass('ovfHiden'); $('body').css({"overflow-x":"auto","overflow-y":"auto"}); } function rollImg(o){ /* 获取当前页面的缩放比 若未设置zoom缩放比,则为默认100%,即1,原图大小 */ var zoom=parseInt(o.style.zoom)||100; /* event.wheelDelta 获取滚轮滚动值并将滚动值叠加给缩放比zoom wheelDelta统一为±120,其中正数表示为向上滚动,负数表示向下滚动 */ zoom+=event.wheelDelta/12; /* 如果缩放比大于0,则将缩放比加载到页面元素 */ if (zoom>0) o.style.zoom=zoom+'%'; /* 如果缩放比不大于0,则返回false,不执行操作 */ return false; } var pan_type =function pan_type(e) { if (e == 'A') { var typ_tet = 'ARTICLE' } else if (e == 'B') { var typ_tet = 'REVIEW' } else if (e == 'C') { var typ_tet = 'CASE REPORT' } else if (e == 'P') { var typ_tet = 'RESEARCH PROPOSAL' } else if (e == 'N') { var typ_tet = 'NEWS' } else if (e == 'T') { var typ_tet = 'COMMENT' } else if (e == 'CT') { var typ_tet = 'CORRECTION'; } else if (e == 'HT') { var typ_tet = 'HYPOTHESIS'; } else if (e == 'PF') { var typ_tet = 'PREFACE'; } else if (e == 'ET') { var typ_tet = 'EDITORIAL'; } else if (e == 'RP') { var typ_tet = 'REPORT'; } else if (e == 'EF') { var typ_tet = 'EMPIRICAL FORMULA'; } else if (e == 'EM') { var typ_tet = 'EVIDENCE-BASED MEDICINE'; } else if (e == 'EC') { var typ_tet = 'EXPERT CONSENSUS'; } else if (e == 'LTE') { var typ_tet = 'LETTER TO EDITOR'; } else if (e == 'QI') { var typ_tet = 'QUESTIONNAIRE INVESTIGATION'; } else if (e == 'PT') { var typ_tet = 'PROTOCOL'; } else if (e == 'CS') { var typ_tet = 'CASE SERIES'; }else{ var typ_tet = 'OTHER'; } return typ_tet; }