'+$data[i].articleTitle+'
'+ ''+commenTime($data[i].publishTime)+'' $(str).appendTo(listLi); } } } }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } //平台最近文章 function platfromRecentlyArticle(obj) { $.ajax({ "url" :"/ajax/article/pageQuery" , "type" : "GET" , "dataType" : "json", "data" :{ownerId:obj,articleType:'3',status:'1'}, "success" : function(data) { if (data.success){ var $data=data.data.data; console.log($data); var only=false; if($data.length>1){ $(".recentlyList").parents(".currentBlock").removeClass("displayNone"); var oLeng=$data.length<5?$data.length:5; for(var i=0;i'+$data[i].articleTitle+'
'+ ''+commenTime($data[i].publishTime)+'' $(str).appendTo(listLi); } } } }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } //初始化文章内容 function articleshow(){ $.ajax({ "url" : "/ajax/article/query", "type" : "GET" , "dataType" : "json", "data" :{"articleId":articleId}, "success" : function(data) { if (data.success){ var articletitle = data.data.articleTitle + "-科袖网"; document.title = articletitle; $("#articleTitle").text(data.data.articleTitle); $("#pageViews").text("阅读量 "+data.data.pageViews); $("#publishTime").text(commenTime(data.data.publishTime)); $("#articleContent").html(data.data.articleContent); if(data.data.articleImg){ $("#articleImg").attr("style", "background-image: url(/data/article/" + data.data.articleImg + ")"); }else{ $("#articleImg").attr("style", "background-image: url(../images/default-artical.jpg)"); } $("#tagList").text(industryShow(data.data.subject)); if (userid && userid != "null" && userid != null) { isAgree(data.data.articleAgree)//文章点赞 }else{ $(".thumbBtn").html("赞 "+data.data.articleAgree+""); } ifcollectionAbout(articleId,$("#attention").find("em"), 3) if(data.data.articleType==1){ $("#expert").removeClass("displayNone"); relevantarticalList(data.data.ownerId); expert(data.data.ownerId); recentlyArticle(2,{"ownerId":data.data.ownerId}) } if(data.data.articleType==2){ $("#enterprise").removeClass("displayNone"); relevantarticalList(data.data.ownerId); cmpFun(data.data.ownerId); companylist(); recentlyArticle(1,{"ownerId":data.data.ownerId}); } if(data.data.articleType==3){ $("#enterprise").removeClass("displayNone"); relevantarticalList(data.data.ownerId); platform(data.data.ownerId); platfromRecentlyArticle(data.data.ownerId); } var weibotitle = data.data.articleTitle; var weibourl =window.location.href; var weibopic ="http://"+window.location.host+"/data/article/" + data.data.articleImg; $("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+encodeURIComponent(weibotitle)+"&url="+encodeURIComponent(weibourl)+"&pic="+encodeURIComponent(weibopic)+"&content=utf-8"+"&ralateUid=6242830109&searchPic=false&style=simple"); } window.setTimeout(function() { $('body').scrollTop(4); $('.shareBlock').scrollFix({ startTop:'body', bottom: 0, endPos : '.share-bottom', width: $('.share-nav').outerWidth(true), zIndex : 999 }); }, 300); //不随滚动条滚动的固定层广告代码 window.setTimeout(function() { $('#scroll-fixed-ad').scrollFix({ oflag:true, startTop:'#scroll-fixed-ad', startBottom:".privateInfo", distanceTop: $("header").outerHeight(true) + 20, endPos: 'footer', zIndex: 998 }); }, 300); }, "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,.userimg").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,.username").text(data.data.name); $("#Zname").attr("dataid",data.data.id); $(".hrefgo,.useurl").attr("href", "userInforShow.html?professorId="+data.data.id); $("#Ztitle").text(title); $("#ZorgName").text(data.data.orgName); var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus); $("#ZauthFlag,.labels").attr("title", userType.title); $("#ZauthFlag,.labels").addClass(userType.sty); if(data.data.id!=userid){ $("#expert").find(".goSpan").removeClass("displayNone"); ifcollectionAbout(data.data.id,$("#expert").find(".attenSpan"), 1) } } }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } /*企业用户信息*/ function cmpFun(orgId) { $.ajax({ "url": "/ajax/org/" + orgId, "type": "get", "dataType" : "json", "success": function(data) { if(data.success && data.data) { $(".userimg").removeClass("useHead"); if(data.data.forShort) { $("#Qname,.username").text(data.data.forShort); }else{ $("#Qname,.username").text(data.data.name); } $("#Qname").attr("dataid",data.data.id); $(".qiyego,.useurl").attr("href", "cmpInforShow.html?orgId="+data.data.id); if(data.data.hasOrgLogo) { $(".userimg").attr("style","background: #fff;") $(".userimg").html(''; itemlist += ''; itemlist += ''; itemlist += '
'; itemlist += ''; itemlist += '
'+$html.name+'
'; itemlist += ''; itemlist += '
'+cnt+'
'; itemlist += ''; itemlist += '
'; itemlist += '
'; itemlist += '
'+ subs[i] +'