/*文章预览*/ $(function() { loginStatus();//判断个人是否登录 valUser(); var articleId = GetQueryString("articleId"); articleshow(); relevantExperts(); relevantResources(); //文章内容 function articleshow(){ $.ajax({ "url" : "/ajax/article/query", "type" : "GET" , "dataType" : "json", "data" :{"articleId":articleId}, "success" : function(data) { if (data.success){ $("#articleTitle").text(data.data.articleTitle); $("#articleContent").html(data.data.articleContent); $("#articleImg").attr("style", "background-image: url(/data/article/" + data.data.articleImg + ");"); $("#tagList").text(industryShow(data.data.subject)); if(data.data.articleType==1){ $("#expert").removeClass("displayNone"); expert(data.data.professorId); } if(data.data.articleType==2){ $("#enterprise").removeClass("displayNone"); cmpFun(data.data.orgId); } } var articletitle = data.data.articleTitle + "-科袖网"; window.setTimeout(function() { document.title = articletitle; }, 500); }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } //专家信息 function expert(professorId){ $.ajax({ "url" : "/ajax/professor/baseInfo/"+professorId, "type" : "GET" , "dataType" : "json", "success" : function(data) { if (data.success && data.data){ if(data.data.hasHeadImage==1) { $("#Zimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);"); } if(data.data.title==""){ var title = data.data.office; }else{ var title = data.data.title; } $("#Zname").text(data.data.name); $("#Ztitle").text(title); $("#ZorgName").text(data.data.orgName); var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus); $("#ZauthFlag").attr("title", userType.title); $("#ZauthFlag").addClass(userType.sty); } }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } /*企业用户信息*/ function cmpFun(orgId) { $.ajax({ "url": "/ajax/org/" + orgId, "type": "get", "dataType" : "json", "success": function(data) { if(data.success && data.data) { $("#Qname").text(data.data.name); if(data.data.hasOrgLogo) { $("#Qimg").attr("style", "background-image: url(/images/org/" + data.data.id + ".jpg);"); } if(data.data.authStatus==3){ $("#QauthFlag").addClass("authicon-com-ok").attr("title", "认证企业");; } $("#Qindustry").text(QindustryShow(data.data.industry)); if(data.data.orgType==2){ $("#QorgType").text("上市企业"); }else if(data.data.orgType==3){ $("#QorgType").text("国有企业"); }else if(data.data.orgType==4){ $("#QorgType").text("合资企业"); }else if(data.data.orgType==5){ $("#QorgType").text("私人企业"); }else if(data.data.orgType==6){ $("#QorgType").text("外资企业"); }else if(data.data.orgType==7){ $("#QorgType").text("初创企业"); }else{ $("#QorgType").text(""); } } }, "error": function() { $.MsgBox.Alert('提示', '链接服务器超时') } }); } //相关专家 function relevantExperts(){ $.ajax({ "url": "/ajax/article/ralatePro", "type": "get", "dataType" : "json", "data" :{"articleId":articleId}, "success": function(data) { if(data.success && data.data) { for(var i = 0; i < data.data.length; i++) { var professorId = data.data[i].professorId; relevantExpertsList(professorId) } } }, "error": function() { $.MsgBox.Alert('提示', '链接服务器超时') } }); } //相关专家信息 function relevantExpertsList(professorId){ $.ajax({ "url" : "/ajax/professor/info/"+professorId, "type" : "GET" , "dataType" : "json", "success" : function(data) { if (data.success && data.data!=""){ $("#relevantExperts").parent().parent().removeClass("displayNone"); var itemlist = ''; $("#trelevantExperts").html(""); var itemlist = '
'; itemlist += ''; itemlist += ''; itemlist += '
'; itemlist += '
'+ subs[i] +'