$(function(){ $(".headnav li").eq(0).addClass("navcurrent"); loginStatus();//判断个人是否登录 //加载页面时,判断企业账号是否登录 var orgid = $.cookie('orgId'); $("#cmpSettled").on("click",function(){ if (orgid && orgid != "null" && orgid != null) { location.href="cmp-portal/cmp-workspaces.html" }else{ location.href="cmp-portal/cmp-settled-reg.html" } }) $("#gocmp").on("click",function(){ if (orgid && orgid != "null" && orgid != null) { location.href="cmp-portal/cmp-workspaces.html" }else{ location.href="cmp-portal/cmp-settled-log.html" } }) var sureOrg ='

请先确认您的所在机构:(建议填写正式全称)

'+ '

50字以内

'+ '

注:

1. 只能发布您所在机构的需求。

2. 当您在资料中变更了所在机构后,该需求将会自动关闭。

'; $(".setTimeBlock").on("focus",".sureOrg",function(){ $(".msg-warning").show(); }).on("blur",".sureOrg",function(){ $(".msg-warning").hide(); }).on("keyup",".sureOrg",function(){ if($(this).val().length>0){ $(".setTimeBlock").find(".mb_btnOkpub").removeAttr("disabled"); }else{ $(".setTimeBlock").find(".mb_btnOkpub").attr("disabled",true) } }) /*发布需求*/ $("#postNow").click(function(){ if(userid=="null"||userid==undefined){ location.href="login.html"; } var $status=["0","1"]; $.ajax({//查询是否有发布中和已过期的需求 url:"/ajax/demand/qc", type:"get", data:{ state:$status, uid:userid }, async:true, datatype:"json", traditional: true, success:function(data){ console.log(data) var statusN=data.data; if(statusN){ window.open("postDemand.html"); }else{ $(".blackcover2").fadeIn(); var btnOk='' $(".modelContain").show(); $("body").addClass("modelOpen"); $(".mb-listL").remove();$("#promotTh").prepend(sureOrg); $(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk); $.ajax({ "url": "/ajax/professor/editBaseInfo/" + userid, "type": "get", "async": true, "datatype":"json", "success": function(data) { if(data.success && data.data) { if(data.data.orgName!=""){ $(".setTimeBlock .sureOrg").val(data.data.orgName); $("#oldName").val(data.data.orgName); } if($(".setTimeBlock .sureOrg").val().length>0){ $(".setTimeBlock").find(".mb_btnOkpub").removeAttr("disabled"); } } } }); $(".mb_btnOkpub").on("click", function() { $(".blackcover2").fadeOut(); $(".modelContain").hide(); $("body").removeClass("modelOpen"); var newName=$(".setTimeBlock .sureOrg").val(); if(newName.length<50){ if(newName == $("#oldName").val()){ location.href="postDemand.html"; }else{ updateOrgName(newName); } }else{ $.MsgBox.Alert("提示", "机构名称不得超过50个字"); } }) } } }); }) /*我是专家*/ $("#JoinKeXiu").click(function(){ if(userid=="null"||userid==undefined){ location.href="login.html"; } location.href="expert-authentication.html" }) //热门领域 $(".field").bind("click",function(){ location.href = "searchNew.html?subject=" + encodeURI($(this).text()); }) //热门专家 $('.professor').hover(function() { $(this).find(".professor-data").stop(true, false).animate({ "padding": "94px 0", "top": "-50px" }) }, function() { $(this).find(".professor-data").stop(true, false).animate({ "padding": "25px 0", "top": "58%" }) }) })