portal html css js resource

p.html 31KB

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>用户分享-科袖网</title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <link rel="stylesheet" href="../css/reset.css" /> <link rel="stylesheet" href="../css/common.css" /> <link rel="stylesheet" href="../css/share.css" /> <style> html,body{margin:0;padding:0px;background: #F4F6F8;} </style> <script type="text/javascript" src="../js/jquery-1.11.1.js"></script> <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script type="text/javascript" src="../js/public/shareCom.js"></script> <script type="text/javascript" src="../js/public/openApp.js"></script> </head> <body> <div class="contentBody2"> <div class="showCardI"> <div class="cardTop"> <div class="cardImg userCard" id="proHead"></div> <div class="cardInfo"> <p><span class="h1Font" id="proName"></span><em class="authiconNew" title="" id="proAuth"></em></p> <p class="ellipsisSty h2Font"id="proOther"></p> <p class="h3Font" id="proAddress"></p> </div> </div> </div> <div class="mainbox"> <div class="infocon madiaBlock needList" style="border:none"> <ul class="mui-table-view" id="showDemand"> <!--<li class="mui-table-view-cell"> <div class="madiaInfo"> <p class="h1Font mui-ellipsis-2">需求主题寻求一名斯特林热机技术顾问需求主题寻求一名斯特林热机技术顾问需求主题寻求一名斯特林热机技术顾问</p> <p class="h2Font mui-ellipsis-5">需求内容:我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进, 想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出产品的三维模型,用于展示以及为后续生产做准备我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进, 想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出</p> <div class="showli mui-ellipsis"> <span>北京市</span> <span>预期 1个月内</span> <span>预算 1万元以内</span> <span>有效期至 8月17日</span> </div> </div> </li>--> </ul> </div> </div> <div class="mainbox"> <div class="infocontit mui-clearfix" style="cursor: pointer;" id="goCmpBrief">个人介绍 <em></em></div> <div class="infocon"> <span class="breifinfo" id="breifinfo"> </span> </div> </div> <div class="mainbox"> <div class="infocontit">学术领域</div> <div class="infocon listArea"> <ul id="subjectShow"> </ul> </div> </div> <div class="mainbox"> <div class="infocontit">研究方向</div> <div class="infocon reserachMess" id="reserachMess"> </div> </div> <div class="mainbox"> <div class="infocontit">行业领域</div> <div class="infocon listArea"> <ul id="industryShow"> </ul> </div> </div> <div class="mainbox"> <div class="infocontit">资源</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="resourceShow"> </ul> </div> <div class="seeMore displayNone" id="seeMoreResource"><em>查看全部<span id="resourceNum">0</span>个</em></div> </div> <div class="mainbox"> <div class="infocontit">专利</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="patentShow"> </ul> </div> <div class="seeMore displayNone" id="seeMorePatent"><em>查看全部<span id="patentNum">0</span>项</em></div> </div> <div class="mainbox"> <div class="infocontit">论文</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="paperShow"> </ul> </div> <div class="seeMore displayNone" id="seeMorePaper"><em>查看全部<span id="paperNum">0</span>篇</em></div> </div> <div class="mainbox"> <div class="infocontit">文章</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="articelShow"> </ul> </div> <div class="seeMore displayNone" id="seeMoreArtical"><em>查看全部<span id="articalNum">0</span>篇</em></div> </div> <!--合作评价--> <div class="mainbox displayNone"> <div class="infocontit">合作评价</div> <div class="infocon madiaBlock"> <ul class="mui-table-view commentsArea" id="evaluateShow"> </ul> </div> <div class="seeMore displayNone" id="seeMoreEvaluate"><em>查看全部<span id="evaluateNum">0</span>条</em></div> </div> <!--合作专家--> <div class="mainbox displayNone"> <div class="infocontit">合作专家</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="relatePro"> </ul> </div> </div> <!--相关文章--> <div class="mainbox displayNone"> <div class="infocontit">相关文章</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="relateArt"> </ul> </div> </div> <!--您可能感兴趣的专家--> <div class="mainbox displayNone"> <div class="infocontit">您可能感兴趣的专家</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="likePro"> </ul> </div> </div> <div class="shareEcode"> <img class="Ecodecon" src="../images/ecordCard.jpg" /> <div class="Ecodeinfo"> <a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"><button class="frmbtn frmactive">下载移动客户端</button></a> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { var imgUrl = "http://www.ekexiu.com/images/logo180.png"; var lineLink = document.location.href; var descContent; var shareTitle; var appid = ''; var proId = GetQueryString("id"); userMessage(proId); //historyEvaluate(); getArticel(); getResource(); getPaper(); getPatent(); getDemands(); relevantExperts();//合作专家 relevantarticalList();//相关文章 likeExperts();//感兴趣专家 var this_="../html/userInforShow.html?proid="+proId; wcFresh(this_); $("body").on("click",".seeMore,#goCmpBrief",function(){ isInstalled(this_,true); $(this).addClass("activeThis"); }) $('#articelShow,#relateArt').on('click', 'li', function() { var id = this.getAttribute("data-id"); location.href="http://" + window.location.host + "/e/a.html?id=" + id; $(this).addClass("activeThis"); }) $('#resourceShow').on('click', 'li', function() { var id = this.getAttribute("data-id"); location.href="http://" + window.location.host + "/e/r.html?id=" + id; $(this).addClass("activeThis"); }) $('#paperShow').on('click', 'li', function() { var id = this.getAttribute("data-id"); location.href="http://" + window.location.host + "/e/l.html?id=" + id; $(this).addClass("activeThis"); }) $('#patentShow').on('click', 'li', function() { var id = this.getAttribute("data-id"); location.href="http://" + window.location.host + "/e/z.html?id=" + id; $(this).addClass("activeThis"); }) function userMessage(id) { $.ajax({ type:"get", url:"/ajax/professor/info/"+ proId, async:true, success: function(data) { var $info = data.data; if(data.success) { if($info.hasHeadImage){ $("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)"); } $("#proName").text($info.name); var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus); $("#proAuth").addClass(oStyS.sty); $("#proAuth").attr("title",oStyS.title); if($info.address){ $("#proAddress").html('<em class="mui-icon iconfontnew icon-address"></em> ' + $info.address); } var proOther=""; if($info.orgName){ if($info.department){ if($info.title){ proOther = $info.title + "," + $info.department + "," + $info.orgName }else{ if($info.office){ proOther = $info.office + "," + $info.department + "," + $info.orgName }else{ proOther = $info.department + "," + $info.orgName } } }else{ proOther = $info.orgName } } $("#proOther").text(proOther); var llqtitle=$info.name + "-" + proOther.replace(/,/gi,"-");//修改浏览器title信息 document.title = llqtitle; //个人简介 if($info.descp) { $("#breifinfo").text($info.descp); }else{ document.getElementById("breifinfo").parentNode.style.display = "none"; } //学术领域 if($info.subject) { indu($info.subject, 'subjectShow') } else { document.getElementById("subjectShow").parentNode.parentNode.style.display = "none"; } //研究方向 if($info.researchAreas.length) { researchAreaShow($info.researchAreas, $info.editResearchAreaLogs); } else { document.getElementById("reserachMess").parentNode.style.display = "none"; } //行业领域 if($info.industry) { indu($info.industry, 'industryShow') } else { document.getElementById("industryShow").parentNode.parentNode.style.display = "none"; } //微信再次分享 shareTitle = document.getElementById("proName").innerText; descContent = document.getElementById("subjectShow").innerText.substring(0,70); } }, error: function() { } }); } //查询研究方向 function getRecords($researchAreaLogs, caption) { var ret = []; var t = 0; for(var i = 0; i < $researchAreaLogs.length; i++) { if(caption == $researchAreaLogs[i].caption) { ret[t] = { id: $researchAreaLogs[i].opreteProfessorId, img: $researchAreaLogs[i].hasHeadImage } t++; } } return ret; } var resear = ""; function researchAreaShow($datas, $datarecords) { if($datas != undefined && $datas.length != 0) { var html = []; for(var i = 0; i < $datas.length; ++i) { var $data = $datas[i]; var $photos = []; //获取头像 if($datarecords.length > 0) { $photos = getRecords($datarecords, $data.caption); } var showDiv = "<div class='listbox'><div class='listbrowse ellipsisSty'dataCaption="+$data.caption+"><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='likenum' dataCaption="+$data.caption+">" if($photos.length < 4) { for(var j = 0; j < $photos.length; ++j) { if($photos[j].img) { showDiv += "<span class='likepeople userRadius'><img class='like-h' src='../images/head/" + $photos[j].id + "_m.jpg'></span>"; } else { showDiv += "<span class='likepeople userRadius'><img class='like-h' src='../images/default-photo.jpg'></span>"; } } } else { for(var j = $photos.length - 2; j < $photos.length; ++j) { if($photos[j].img) { showDiv += "<span class='likepeople userRadius'><img class='like-h' src='../images/head/" + $photos[j].id + "_m.jpg'></span>"; } else { showDiv += "<span class='likepeople userRadius'><img class='like-h' src='../images/default-photo.jpg'></span>"; } } showDiv += "<span class='mui-icon iconfont icon-more likepeople likemore userRadius'></span>"; } showDiv += "</div></div></div>"; html.push(showDiv); resear += (i + 1) + "." + $data.caption + " "; } document.getElementById("reserachMess").innerHTML = html.join('') } } /*应用行业及领域及企业纸质*/ function indu(oString, oSelector) { var arr = oString.split(","); var oArr = new Array(); var i; for(i in arr) { oArr.push('<li>' + arr[i] + '</li>'); } document.getElementById(oSelector).innerHTML = oArr.join(""); } function getResource() { $.ajax({ url: "../ajax/resource/pqProPublish", type: "GET", timeout: 10000, dataType: "json", data: { "professorId": proId, }, success: function(data) { console.log(data) if(data.success) { var obj = data.data.data; if(obj.length>0){ document.getElementById("resourceNum").innerText = obj.length; if(obj.length>2){ obj.length =2; document.getElementById("seeMoreResource").classList.remove("displayNone"); } for(var i = 0; i < obj.length; i++) { var liItem = document.createElement("li"); liItem.className = "mui-table-view-cell" liItem.setAttribute("data-id",obj[i].resourceId) var oString = '<div class="flexCenter OflexCenter clearfix">' if(obj[i].images.length) { oString += '<div class="madiaHead resouseHead" style="background-image:url(../data/resource/' + obj[i].images[0].imageSrc +')"></div>' } else { oString += '<div class="madiaHead resouseHead"></div>' } oString += '<div class="madiaInfo OmadiaInfo"><p class="ellipsisSty h1Font">' + obj[i].resourceName + '</p>' oString += '<p class="h2Font ellipsisSty-2">用途:' + obj[i].supportedServices + '</p>' oString += '</div></div>' liItem.innerHTML = oString; document.getElementById("resourceShow").appendChild(liItem); } }else{ document.getElementById("resourceShow").parentNode.parentNode.style.display="none"; } } }, error: function() { } }) } function getArticel() { $.ajax({ url: "../ajax/article/pqProPublish", type: "GET", timeout: 10000, dataType: "json", data: { "professorId": proId, }, success: function(data) { console.log(data) if(data.success) { var obj = data.data.data; if(obj.length>0){ document.getElementById("articalNum").innerText = obj.length; if(obj.length>2){ obj.length =2; document.getElementById("seeMoreArtical").classList.remove("displayNone"); } for(var i = 0; i < obj.length; i++) { var liItem = document.createElement("li"); liItem.setAttribute("data-id",obj[i].articleId); liItem.setAttribute("owner-id",obj[i].orgId); liItem.className = "mui-table-view-cell" var oString = '<div class="flexCenter OflexCenter clearfix">' if(obj[i].articleImg) { oString += '<div class="madiaHead artHead" style="background-image:url(../data/article/' + obj[i].articleImg + ')"></div>' } else { oString += '<div class="madiaHead artHead"></div>' } oString += '<div class="madiaInfo OmadiaInfo"><p class="ellipsisSty-2 h1Font">' + obj[i].articleTitle + '</p>' oString += '<p class="h2Font ellipsisSty"><span class="time">'+commenTime(obj[i].publishTime)+'</span></p>' oString += '</div></div>' liItem.innerHTML = oString; document.getElementById("articelShow").appendChild(liItem); } }else{ document.getElementById("articelShow").parentNode.parentNode.style.display="none"; } } }, error: function() { } }) } function getPaper() { $.ajax({ url: "../ajax/ppaper/byProfessor", type: "GET", timeout: 10000, dataType: "json", data: { "id": proId, }, success: function(data) { console.log(data) if(data.success) { var obj = data.data.data; if(obj.length>0){ document.getElementById("paperNum").innerText = obj.length; if(obj.length>2){ obj.length =2; document.getElementById("seeMorePaper").classList.remove("displayNone"); } for(var i = 0; i < obj.length; i++) { var liItem = document.createElement("li"); liItem.setAttribute("data-id",obj[i].id); liItem.className = "mui-table-view-cell" var oString = '<div class="flexCenter OflexCenter clearfix">' oString += '<div class="madiaHead paperHead"></div>' oString += '<div class="madiaInfo OmadiaInfo"><p class="ellipsisSty-2 h1Font">' + obj[i].name + '</p>' oString += '<p class="ellipsisSty h2Font">作者:' + obj[i].authors.substring(0, obj[i].authors.length - 1) + '</p>' oString += '</div></div>' liItem.innerHTML = oString; document.getElementById("paperShow").appendChild(liItem); } }else{ document.getElementById("paperShow").parentNode.parentNode.style.display="none"; } } }, error: function() { } }) } function getPatent() { $.ajax({ url: "../ajax/ppatent/byProfessor", type: "GET", timeout: 10000, dataType: "json", data: { "id": proId, }, success: function(data) { console.log(data) if(data.success) { var obj = data.data.data; if(obj.length>0){ document.getElementById("patentNum").innerText = obj.length; if(obj.length>2){ obj.length =2; document.getElementById("seeMorePatent").classList.remove("displayNone"); } for(var i = 0; i < obj.length; i++) { var liItem = document.createElement("li"); liItem.setAttribute("data-id",obj[i].id); liItem.className = "mui-table-view-cell" var oString = '<div class="flexCenter OflexCenter clearfix">' oString += '<div class="madiaHead patentHead"></div>' oString += '<div class="madiaInfo OmadiaInfo"><p class="ellipsisSty-2 h1Font">' + obj[i].name + '</p>' oString += '<p class="ellipsisSty h2Font">发明人:' + obj[i].authors.substring(0, obj[i].authors.length - 1) + '</p>' oString += '</div></div>' liItem.innerHTML = oString; document.getElementById("patentShow").appendChild(liItem); } }else{ document.getElementById("patentShow").parentNode.parentNode.style.display="none"; } } }, error: function() { } }) } //获取需求 function getDemands() { $.ajax({ url: "/ajax/demand/pq", type: "GET", timeout: 10000, dataType: "json", data: { "state":'1', "uid":proId, }, success: function(data) { if(data.success) { document.getElementById("showDemand").innerHTML=""; var $info = data.data.data; if($info.length > 0){ for(var i = 0; i < $info.length; i++) { var liStr = document.createElement("li"); liStr.setAttribute("data-id",$info[i].id); liStr.className = "mui-table-view-cell" document.getElementById("showDemand").appendChild(liStr); demandHtml($info[i],liStr); } }else{ document.getElementById("showDemand").parentNode.parentNode.style.display="none"; } } }, error: function() { } }) } function demandHtml($data,liStr) { var strCon=''; strCon+='<a href="d.html?id='+$data.id+'" class="madiaInfo">' strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>' strCon+='<p class="h2Font ellipsisSty-5">'+$data.descp+'</p>' strCon+='<div class="showli mui-ellipsis">' if($data.city){ strCon+='<span>'+$data.city+'</span>' } if($data.duration!=0){ strCon+='<span>预期 '+demandDuration[$data.duration]+'</span>' } if($data.cost!=0){ strCon+='<span>预算 '+demandCost[$data.cost]+'</span>' } if($data.invalidDay){ strCon+='<span>有效期至 '+TimeTr($data.invalidDay)+'</span>' } strCon+='</div>' strCon+='</a>' liStr.innerHTML=strCon } function historyEvaluate(){ $.ajax({ "url": "/ajax/consult/pqAssessHis", "type": "get", "data": { "professorId": proId }, "async": false, "success": function(response) { if(response.success) { var $data = response.data.data; if($data.length>0){ document.getElementById("evaluateNum").innerText = $data.length; if($data.length>2){ $data.length =2; document.getElementById("seeMoreEvaluate").classList.remove("displayNone"); } for(var i = 0; i < $data.length; i++) { var assessTime = commenTime($data[i].assessTime); var assessContant =""; if($data[i].assessContant) { assessContant = $data[i].assessContant; } var userhed=''; if($data[i].professor.hasHeadImage) { userhed = 'background-image:url(/images/head/' + $data[i].professor.id + '_l.jpg)'; } else { userhed = 'background-image:url(/images/default-photo.jpg)'; } var add = ""; add += '<li class="flexCenter">'; add += '<a style="width:auto" href="p.html?id='+ $data[i].professor.id +'" class="userhref"><div class="madiaHead useHead useHeadMsg" style="'+ userhed +'"></div></a>' add += '<div class="madiaInfo"><div style="position: relative;">'; add += '<a href="p.html?id='+ $data[i].professor.id +'" class="userhref"><span class="h1Font messageName">'+ $data[i].professor.name +'</span></a>'; add += '<em class="authiconNew authicon-pro" title=" "></em>'; add += '<ul class="starShow">'; add += '<li></li> <li></li> <li></li> <li></li> <li></li>'; add += '</ul></div>'; add += '<p class="h2Font messageContent">'+ assessContant +'</p>'; add += '<span class="commenttime">'+ assessTime +'</span>'; add += '</div></li>'; var $add = $(add); $("#evaluateShow").append($add); $add.find(".starShow>li:lt(" + $data[i].assessStar + ")").addClass('evastar'); } }else{ document.getElementById("evaluateShow").parentNode.parentNode.style.display="none"; } } } }) } //合作专家 function relevantExperts(){ $.ajax({ "url": "/ajax/professor/coadjutant", "type": "get", "dataType" : "json", "data" :{"id":proId}, "success": function(data) { if(data.success && data.data) { console.log(data) var lengthT; if(data.data.length>5){ lengthT=5; }else{ lengthT=data.data.length } for(var i = 0; i < lengthT; i++) { var ExpId = data.data[i].professorId; var paperN=data.data[i].paperCount; var patentN=data.data[i].patentCount; var liItem=document.createElement("li"); liItem.className="mui-table-view-cell flexCenter"; document.getElementById("relatePro").appendChild(liItem); relExpertsList(ExpId,paperN,patentN,liItem); } } }, "error": function() { $.MsgBox.Alert('提示', '链接服务器超时') } }); } function relExpertsList(Id,numL,numZ,liItem){ $.ajax({ "url" : "/ajax/professor/info/"+Id, "type" : "GET" , "dataType" : "json", "success" : function(data) { if (data.success && data.data!=""){ document.getElementById("relatePro").parentNode.parentNode.classList.remove("displayNone"); var thisTit,thisImg,copNum="" if(data.data.hasHeadImage == 1) { thisImg="/images/head/" + data.data.id + "_l.jpg);" }else{ thisImg="../images/default-photo.jpg);" } if(numL){ if(numZ){ copNum="合作:"+numZ+"项专利,"+numL+"篇论文" }else{ copNum="合作:"+numL+"篇论文" } }else{ if(numZ){ copNum="合作:"+numZ+"项专利" }else{ } } if(data.data.title) { if(data.data.orgName) { thisTit=data.data.title +","+ data.data.orgName; }else{ thisTit=data.data.title; } }else{ if(data.data.office) { if(data.data.orgName) { thisTit=data.data.office +","+ data.data.orgName; }else{ thisTit=data.data.office; } }else{ if(data.data.orgName) { thisTit=data.data.orgName; } } } var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus); var itemlist = '<a href="p.html?id='+data.data.id+'" class="urlgo"><div class="madiaHead useHead" style="background-image:url('+thisImg+')"></div>'; itemlist += '<div class="madiaInfo">'; itemlist += '<p class="ellipsisSty"><span class="h1Font" id="userName">'+data.data.name+'</span><em class="authiconNew '+userType.sty+'" title="'+userType.title+'"></em></p>'; itemlist += '<p class="ellipsisSty h2Font">'+thisTit+'</p>'; itemlist += '<p class="h2Font ellipsisSty">'+copNum+'</p>'; itemlist += '</div></a>'; liItem.innerHTML = itemlist liItem.setAttribute("data-id",data.data.id) } }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } //相关文章信息 function relevantarticalList(){ $.ajax({ "url" : "/ajax/article/byAssProfessor", "type" : "GET" , "dataType" : "json", "data" :{"id":proId}, "async":"false", "traditional": true, //传数组必须加这个 "success" : function(data) { console.log(data); if (data.success && data.data!=""){ document.getElementById("relateArt").parentNode.parentNode.classList.remove("displayNone"); document.getElementById("relateArt").innerHTML=""; var StrData = data.data var lengthT; if(data.data.length>5){ lengthT=5; }else{ lengthT=data.data.length } for(var i = 0; i < lengthT; i++) { (function(n) { var imgL="../images/default-artical.jpg"; if(StrData[i].articleImg){ imgL='../data/article/' + StrData[i].articleImg } var oURL; if(StrData[i].articleType==1) { oURL="/ajax/professor/baseInfo/"+StrData[i].professorId; }else{ oURL="/ajax/org/" + StrData[i].orgId; } $.ajax({ "url":oURL, "type": "GET", 'dataType': "json", "success": function(data) { var thisName,userType,thisAuth,thisTitle if(data.data.forShort){ thisName=data.data.forShort; }else{ thisName=data.data.name; } if(StrData[n].articleType==1) { userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus); thisTitle = userType.title; thisAuth = userType.sty; }else { if(data.data.authStatus==3) { thisTitle = "科袖认证企业"; thisAuth = "authicon-com-ok"; } } var add = document.createElement("li"); add.className = "mui-table-view-cell flexCenter OflexCenter"; add.setAttribute("data-id",StrData[n].articleId); var itemlist = '<div class="madiaHead artHead" style="background-image:url('+imgL+')"></div>'; itemlist += '<div class="madiaInfo OmadiaInfo">'; itemlist += '<p class="ellipsisSty-2 h1Font" id="usertitle">'+StrData[n].articleTitle+'</p>'; itemlist += '<p><span class="h2Font" style="margin-right:10px">'+thisName+'</span><span class="time">'+commenTime(StrData[n].publishTime)+'</span></p>'; itemlist += '</div>'; add.innerHTML=itemlist; document.getElementById("relateArt").appendChild(add); }, 'error': function() { $.MsgBox.Alert('提示', '服务器连接超时!'); } }); })(i); } } }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } //感兴趣 function likeExperts(){ $.ajax({ "url": "/ajax/professor/ralateProfessors", "type": "get", "dataType" : "json", "data" :{"professorId":proId}, "success": function(data) { if(data.success && data.data) { console.log(data) var lengthT; if(data.data.length>5){ lengthT=5; }else{ lengthT=data.data.length } for(var i = 0; i < lengthT; i++) { var ExpId = data.data[i].id; likeExpertsList(ExpId); } } }, "error": function() { $.MsgBox.Alert('提示', '链接服务器超时') } }); } function likeExpertsList(Id){ $.ajax({ "url" : "/ajax/professor/info/"+Id, "type" : "GET" , "dataType" : "json", "success" : function(data) { if (data.success && data.data!=""){ console.log(data) document.getElementById("likePro").parentNode.parentNode.classList.remove("displayNone"); var itemlist = '<li class="flexCenter"><a href="" class="urlgo">'; itemlist += '<div class="madiaHead useHead" id="userimg"></div>'; itemlist += '<div class="madiaInfo">'; itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>'; itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>'; itemlist += '</div></a></li>'; $itemlist = $(itemlist); $("#likePro").append($itemlist); if(data.data.title) { if(data.data.orgName) { $itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName); }else{ $itemlist.find("#usertitle").text(data.data.title); } }else{ if(data.data.office) { if(data.data.orgName) { $itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName); }else{ $itemlist.find("#usertitle").text(data.data.office); } }else{ if(data.data.orgName) { $itemlist.find("#usertitle").text(data.data.orgName); } } } $itemlist.find("#userName").text(data.data.name); $itemlist.find(".urlgo").attr("href", "p.html?id="+data.data.id); if(data.data.hasHeadImage == 1) { $itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);"); } var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus); $itemlist.find(".authiconNew").attr("title", userType.title); $itemlist.find(".authiconNew").addClass(userType.sty); } }, "error":function(){ $.MsgBox.Alert('提示','链接服务器超时') } }); } liulanNum(); function liulanNum() { $.ajax({ "url": "/ajax/professor/incPageViews", "type": "POST", "dataType": "json", "async": true, "data": { "id": proId, }, "success": function(data) { if(data.success) { console.log(data); } }, "error": function() { $.MsgBox.Alert('提示', '链接服务器超时') } }); } /*微信分享*/ $.ajax({ url: "../ajax/weixin/jsapiTicket", type: 'get', dataType: 'json', contentType: "application/x-www-form-urlencoded; charset=utf-8", data: { 'url': location.href.split('#')[0] }, success: function(data) { if(data.data) { wx.config({ debug: false, //调试模式好犀利 appId: data.data.appId, timestamp: data.data.timestamp, nonceStr: data.data.nonceStr, signature: data.data.signature, jsApiList: [ // 所有要调用的 API 都要加到这个列表中 "onMenuShareAppMessage", "onMenuShareTimeline", "onMenuShareQQ", "onMenuShareQZone", "scanQRCode", ] }); wx.ready(function() { // 在这里调用 API wx.onMenuShareAppMessage({ //分享给朋友 title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); wx.onMenuShareTimeline({ //分享到朋友圈 title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); wx.onMenuShareQQ({ //分享到QQ title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); wx.onMenuShareQZone({ //分享到QQ空间 title: shareTitle, // 分享标题 desc: descContent, // 分享描述 link: lineLink, // 分享链接 imgUrl: imgUrl, // 分享图标 success: share_success_callback, cancel: share_cancel_callback }); }); //分享成功后的回调函数 function share_success_callback() {} //用户取消分享后执行的回调函数 function share_cancel_callback() {} } } }); }) </script> </body> </html>