123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- $(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()
- })
|