portal html css js resource

p.html 15KB

    <!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> </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="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"> </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">资源 (<span id="resourceNum">0</span>)</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="resourceShow"> </ul> </div> <div class="seeMore displayNone" id="seeMoreResource"><em>查看更多</em></div> </div> <div class="mainbox"> <div class="infocontit">专利 (<span id="patentNum">0</span>)</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="patentShow"> </ul> </div> <div class="seeMore displayNone" id="seeMorePatent"><em>查看更多</em></div> </div> <div class="mainbox"> <div class="infocontit">论文 (<span id="paperNum">0</span>)</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="paperShow"> </ul> </div> <div class="seeMore displayNone" id="seeMorePaper"><em>查看更多</em></div> </div> <div class="mainbox"> <div class="infocontit">文章 (<span id="articalNum">0</span>)</div> <div class="infocon madiaBlock"> <ul class="mui-table-view" id="articelShow"> </ul> </div> <div class="seeMore displayNone" id="seeMoreArtical"><em>查看更多</em></div> </div> <div class="shareEcode" style="background: #FFFFFF;"> <div class="Ecodebox"> <div class="Ecodecon clearfix"> <img src="../images/weixin_code.jpg" /> <div class="codecon"> <h1>「 科袖 」</h1> <h2>搭建企业与专家的桥梁</h2> <h3>长按识别科袖公众号</h3> </div> </div> </div> <div style="margin:20px auto;"> <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"); //proId = "91E3F49CE63B43EEBA0C68B6DD7F0A19"; userMessage(proId); getArticel(); getResource(); getPaper(); getPatent(); shareWays();//分享方式 $("body").on("click",".seeMore,#goCmpBrief",function(){ location.href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"; $(this).addClass("activeThis"); }) $('#articelShow').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); } //学术领域 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("subjectShow").parentNode.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,40); } }, error: function() { } }); } //查询研究方向 var getRecords = function($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 = ""; var researchAreaShow = function($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.getElementsByClassName("reserachMess")[0].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">应用用途:' + 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() { } }) } /*企业文章html*/ 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 += '</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 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 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() { } }) } }) </script> </body> </html>