$(document).ready(function() { var id = GetQueryString("orgId"); var oComDescp,oComIndustry,oComSubject,oComQualification,oComUser; loginStatus();//判断个人是否登录 $(document).scroll(function(){ var top3 = $(window).height(); var top5 = $(".content-left").height(); var top4 = $("#container").height(); var top1 = $(document).scrollTop(); var top2 = $("#container").height() - top3 + (top3 - 80 - top5) - 10; //变成绝对定位 if(top1 >= 300) { $(".content-left").css({ "position": "fixed", "top": "80px" }); if(top1 >= top2) { $('.information-content').css("position", "static"); $(".content-left").css("position", "absolute"); $(".content-left").css("top", top4 - top5 - 10 + "px"); } else { $('.information-content').css("position", "relative"); $(".content-left").css({ "position": "fixed", "top": "80px" }); } } else { $(".content-left").css({ "position": "static" }); } }) /*企业信息*/ 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 companytitle = $data.name + "-科袖网"; window.setTimeout(function() { document.title = companytitle; }, 500); $("#comName").text($data.name); if($data.authStatus == 3) { $("#authS").addClass("authicon-com-ok").attr("title", "认证企业"); } /*else { $("#authS").addClass("authicon-com-no").attr("title", "未认证企业"); }*/ if($data.hasOrgLogo) { $("#oimg").attr("src", "/images/org/" + $data.id + ".jpg"); } else { $("#oimg").attr("src", "images/default-icon.jpg"); } if($data.orgUrl) { $("#inteAddress").text($data.orgUrl); } else { $("#inteAddress").text(""); } if($data.foundTime) { var oTime = timeGeshi($data.foundTime); $("#createTime").text(oTime); } else { $("#createTime").remove(); } if($data.city) { $("#ocity").text($data.city); } if($data.descp) { $(".editbox").text($data.descp); } else { oComDescp=0; $("span:contains('企业简介')").parents(".introduction").hide(); $("a:contains('企业简介')").hide(); } if($data.orgSize) { switch($data.orgSize) { case '1': $("#qualificationList").text("50人以内") break; case '2': $("#qualificationList").text("50-100人") break; case '3': $("#qualificationList").text("100-200人") break; case '4': $("#qualificationList").text("200-500人") break; case '5': $("#qualificationList").text("500-1000人") break; case '6': $("#qualificationList").text("1000人以上") break; default: break; } } else { $("#qualificationList").remove(); } if($data.orgType) { switch($data.orgType) { case '2': $("#orgType").text("国有企业"); break; case '3': $("#orgType").text("上市企业"); break; case '4': $("#orgType").text("合资企业"); break; case '5': $("#orgType").text("私人企业"); break; case '6': $("#orgType").text("外资企业"); break; case '7': $("#orgType").text("初创企业"); break; default: break; } }else{ $("#orgType").remove(); } if($data.industry) { indu($data.industry, '#industryShow') } else { oComIndustry=0; $("span:contains('所属行业')").parents(".introduction").hide(); $("a:contains('所属行业')").hide(); } if($data.subject) { indu($data.subject, '#subjectShow') } else { oComSubject=0; $("span:contains('专注领域')").parents(".introduction").hide(); $("a:contains('专注领域')").hide(); } if($data.qualification) { indu($data.qualification, '#qiye ') } else { oComQualification=0; $("span:contains('企业资质')").parents(".introduction").hide(); $("a:contains('企业资质')").hide(); } } }, 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; } /*应用行业及领域及企业纸质*/ function indu(oString, oSelector) { var arr = oString.split(","); var oArr = new Array(); var i; for(i in arr) { if(oSelector == "#subjectShow") { oArr.push('