portal html css js resource

c.html 18KB

    <!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;} .showCardI{background-image: url(../images/enterprise_img_bg_nor@3x.png)} .infocontit:before{background: #28b8fa;} </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 cmpCard"> <div class="boxBlock"><img class="boxBlockimg companyImg" id="oimg" src="../images/default-icon.jpg"></div> </div> <div class="cardInfo"> <p><span class="h1Font" id="companyName"></span><em class="authiconNew" id="authFlag"></em></p> <p class="ellipsisSty h2Font" id="industryShow"></p> <p class="h3Font" id="address"></p> </div> </div> </div> <div class="mainbox"> <div class="infocon madiaBlock needList" style="border:none"> <ul class="mui-table-view" id="showDemand"> </ul> </div> </div> <div class="mainbox"> <div class="infocontit 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 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="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" id="relateArt"> </ul> </div> </div> <!--您可能感兴趣的qiye--> <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 orgId = GetQueryString("id"); companyMessage(orgId); getArticel(); getResource(); getDemands(); likeExperts(); relevantarticalList(); $.ajax({ "url": "/ajax/org/incPageViews", "type": "POST", "dataType": "json", "data": { "id": orgId }, "success": function(data) { console.log(data); if(data.success) {} }, "error": function() { } }); var this_="../html/cmpInforShow.html?cmpId="+orgId; 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; }) $('#resourceShow').on('click', 'li', function() { var id = this.getAttribute("data-id"); location.href="http://" + window.location.host + "/e/r.html?id=" + id; }) function companyMessage(id) { $.ajax({ url: "../ajax/org/" + id, dataType: 'json', //数据格式类型 type: 'GET', //http请求类型 timeout: 10000, //超时设置 success: function(data) { if(data.success) { var $data = data.data; if($data.forShort){ document.getElementById("companyName").innerText = $data.forShort; }else{ document.getElementById("companyName").innerText = $data.name; } if($data.hasOrgLogo) { document.getElementById("oimg").src = "/images/org/" + $data.id + ".jpg"; } else { document.getElementById("oimg").src = "../images/default-icon.jpg"; } /*企业标识*/ if($data.authStatus == 3) { document.getElementById("authFlag").classList.add("authicon-com-ok"); } /*所在城市*/ if($data.city){ document.getElementById("address").innerHTML ='<em class="iconfontnew icon-address"></em> ' + $data.city; } else { document.getElementById("address").style.display = "none"; } /*企业简介*/ if($data.descp) { document.getElementById("breifinfo").innerText = $data.descp; }else{ document.getElementById("breifinfo").parentNode.style.display = "none"; } /*应用行业*/ var proOther = ""; if($data.industry) { proOther = $data.industry.replace(/,/gi, " | "); } document.getElementById("industryShow").innerText = proOther; /*专注领域*/ if($data.subject) { indu($data.subject, 'subjectShow') } else { document.getElementById("subjectShow").parentNode.parentNode.style.display = "none"; } document.title=$data.name + "-" + proOther; //微信再次分享 shareTitle = document.getElementById("companyName").innerText; descContent = document.getElementById("industryShow").innerText.substring(0,40); if(document.getElementById("oimg").src !="../images/default-icon.jpg"){ imgUrl= document.getElementById("oimg").src; } } }, error: function() { } }); } /*应用行业及领域及企业资质*/ 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/pqOrgPublish", type: "GET", timeout: 10000, dataType: "json", data: { "orgId": orgId }, 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><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() { } }) } /*企业文章html*/ function getArticel() { $.ajax({ url: "../ajax/article/pqOrgPublish", type: "GET", timeout: 10000, dataType: "json", data: { "orgId": orgId }, 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.className = "mui-table-view-cell" liItem.setAttribute("data-id",obj[i].articleId); liItem.setAttribute("owner-id",obj[i].orgId); 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 relevantarticalList(){ $.ajax({ url:"/ajax/article/byAssOrg", "type" : "GET" , "dataType" : "json", "data" :{"id":orgId}, "async":"false", "traditional": true, //传数组必须加这个 "success" : function(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) { if(data.success) { var add = document.createElement("li"); add.className = "mui-table-view-cell"; add.setAttribute("data-id",StrData[n].articleId); 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; add.setAttribute("owner-id", data.data.id); add.setAttribute("data-type", 1); }else { add.setAttribute("owner-id", data.data.id); add.setAttribute("data-type", 2); if(data.data.authStatus==3) { thisTitle = "科袖认证企业"; thisAuth = "authicon-com-ok"; } } var itemlist = '<div class="flexCenter OflexCenter clearfix"><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></div>'; add.innerHTML=itemlist; document.getElementById("relateArt").appendChild(add); } }, error: function() { } }); })(i); } } }, error: function() { } }); } //获取需求 function getDemands() { $.ajax({ url: "/ajax/demand/pq", type: "GET", timeout: 10000, dataType: "json", data: { "state":'1', "oid":orgId, }, 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 likeExperts(){ $.ajax({ url:"/ajax/org/ralateOrgs", "type": "get", "dataType" : "json", "data" :{"orgId":orgId}, "success": function(data) { if(data.success && data.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() { } }); } //感兴趣 function likeExpertsList(ExpId){ $.ajax({ url: "/ajax/org/"+ExpId, "type" : "GET" , "dataType" : "json", "success" : function(data) { if (data.success && data.data!=""){ document.getElementById("likePro").parentNode.parentNode.classList.remove("displayNone"); var add = document.createElement("li"); add.setAttribute("data-id",data.data.id); add.className = "mui-table-view-cell"; add.style.minHeight="68px"; var imgL,thisName,thisAuth,thisTitle,otherI=""; if(data.data.hasOrgLogo == 1) { imgL="/images/org/" + data.data.id + ".jpg"; }else{ imgL='../images/default-icon.jpg' } if(data.data.forShort){ thisName=data.data.forShort }else{ thisName=data.data.name } if(data.data.industry){ otherI=data.data.industry.replace(/,/gi, " | "); } if(data.data.authStatus==3){ thisAuth="authicon-com-ok" thisTitle="科袖认证企业" } var itemlist = '<a href="c.html?id='+data.data.id+'" class="flexCenter OflexCenter clearfix"><div class="madiaHead cmpHead"><div class="boxBlock"><img class="boxBlockimg" src="'+imgL+'" /></div></div>'; itemlist += '<div class="madiaInfo OmadiaInfo">'; itemlist += '<p class="ellipsisSty"><span class="h1Font">'+thisName+'</span><em class="authiconNew '+thisAuth+'" title="'+thisTitle+'"></em></p>'; itemlist += '<p class="ellipsisSty h2Font">'+otherI+'</p>'; itemlist += '</div></a>'; add.innerHTML=itemlist; document.getElementById("likePro").appendChild(add); } }, error: function() { } }); } /*微信分享*/ $.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>