$(document).ready(function() { $(".onlogin .headnavbtn li").eq(0).addClass("navcurrent"); var id = $.cookie('orgId'); /*企业信息*/ function companyInformation() { $.ajax({ url: "/ajax/org/" + id, type: "GET", timeout: 10000, dataType: "json", beforeSend: function() {}, success: function(data, textState) { if(data.success) { var $data = data.data; var otext, oguimo; console.log(data); if($data.authStatus != 3) { /*$("#photoClass").addClass("authicon-com-no") $("#photoClass").attr("title", "未认证企业");*/ $("#authBad").show(); } else { $("#photoClass").addClass("authicon-com-ok"); $("#authOk").show(); $("#photoClass").attr("title", "认证企业"); } $(".h1Font").find("span").text($data.name); if($data.hasOrgLogo) { $("#oimg").attr("src", "/images/org/" + $data.id + ".jpg"); } else { $("#oimg").attr("src", "../images/default-icon.jpg"); } if($data.orgUrl) { $("#inteAddress").val($data.orgUrl); } if($data.city) { $("#ocity").text($data.city); } if($data.orgType) { switch($data.orgType) { case '2': otext = "上市企业"; break; case '3': otext = "国有企业"; break; case '4': otext = "合资企业"; break; case '5': otext = "私人企业"; break; case '6': otext = "外资企业"; break; case '7': otext = "初创企业"; break; default: otext = ""; break; } if(otext != "") $("#cmpBasic").append("" + otext + "") } if($data.orgSize) { switch($data.orgSize) { case '1': oguimo = "50人以内"; break; case '2': oguimo = "50-100人"; break; case '3': oguimo = "100-200人"; break; case '4': oguimo = "200-500人"; break; case '5': oguimo = "500-1000人"; break; case '6': oguimo = "1000人以上"; break; default: oguimo = ""; break; } if(oguimo!="") $("#cmpBasic").append("" + oguimo + "") } if($data.foundTime) { var oTime = timeGeshi($data.foundTime); $("#cmpBasic").append("" + oTime + "") } } }, error: function(XMLHttpRequest, textStats, errorThrown) { $.MsgBox.Alert('提示', '服务器请求失败') } }) } /*时间格式转换*/ function timeGeshi(otm) { var otme = otm.substring(0, 4) + "-" + otm.substring(4, 6) + "-" + otm.substring(6, 8); return otme; } companyInformation(); /*获取所有的企业认证用户*/ function companyUser() { $.ajax({ url: "/ajax/professor/qaOrgAuth", type: "GET", timeout: 10000, dataType: "json", data: { "orgId": id, "orgAuth": 1 }, beforeSend: function() {}, success: function(data, textState) { if(data.success) { console.log(data); var $info = data.data; userHtml($info); } }, error: function(XMLHttpRequest, textStats, errorThrown) { $.MsgBox.Alert('提示', '服务器请求失败') } }) } companyUser(); function userHtml(arr) { for(var i = 0; i < arr.length; i++) { var tiof = "", img; if(arr[i].hasHeadImage) { img = "/images/head/" + arr[i].id + "_l.jpg"; } else { img = "../images/default-photo.jpg" } var oString = '
' + arr[i].demandTitle + '
' ostring += '' + tiof + '-' + oTime + '