portal html css js resource

cmp-workspaces.js 2.5KB

    $(document).ready(function() { var id = $.cookie("userid"); console.log(id); /*企业信息*/ 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; console.log(data); if($data.authStatus!=3){ $("#photoClass").addClass("authicon-com-no") $("#authOk").hide(); }else{ $("#photoClass").addClass("authicon-com-ok") $("#authBad").hide(); } $(".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.foundTime) { var oTime = timeGeshi($data.foundTime); $("#createTime").text(oTime); } if($data.city) { $("#ocity").text($data.city); } 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; default: $("#qualificationList").text("1000人以上") break; } } 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; default: $("#orgType").text("初创企业"); break; } } } }, 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() })