portal html css js resource

index.js 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. $(function(){
  2. $(".headnav li").eq(0).addClass("navcurrent");
  3. loginStatus();//判断个人是否登录
  4. //加载页面时,判断企业账号是否登录
  5. var orgid = $.cookie('orgId');
  6. $("#cmpSettled").on("click",function(){
  7. if (orgid && orgid != "null" && orgid != null) {
  8. location.href="cmp-portal/cmp-workspaces.html"
  9. }else{
  10. location.href="cmp-portal/cmp-settled-reg.html"
  11. }
  12. })
  13. $("#gocmp").on("click",function(){
  14. if (orgid && orgid != "null" && orgid != null) {
  15. location.href="cmp-portal/cmp-workspaces.html"
  16. }else{
  17. location.href="cmp-portal/cmp-settled-log.html"
  18. }
  19. })
  20. /*发布需求*/
  21. $("#postNow").click(function(){
  22. if(userid=="null"||userid==undefined){
  23. location.href="login.html";
  24. }
  25. $.ajax({
  26. url: "/ajax/professor/auth",
  27. type: "GET",
  28. timeout: 10000,
  29. dataType: "json",
  30. data: {
  31. "id": userid,
  32. },
  33. success: function(data, textState) {
  34. if(data.success) {
  35. var $rta=data.data;
  36. if($rta.authStatus==3){
  37. location.href="myDemand.html";
  38. }else{
  39. location.href="realname-authentication.html"
  40. }
  41. }
  42. },
  43. error: function(XMLHttpRequest, textStats, errorThrown) {
  44. }
  45. })
  46. })
  47. /*我是专家*/
  48. $("#JoinKeXiu").click(function(){
  49. if(userid=="null"||userid==undefined){
  50. location.href="login.html";
  51. }
  52. location.href="expert-authentication.html"
  53. })
  54. //热门领域
  55. $(".field").bind("click",function(){
  56. location.href = "search.html?subject=" + encodeURI($(this).text());
  57. })
  58. //热门专家
  59. $('.professor').hover(function() {
  60. $(this).find(".professor-data").stop(true, false).animate({
  61. "padding": "94px 0",
  62. "top": "-50px"
  63. })
  64. }, function() {
  65. $(this).find(".professor-data").stop(true, false).animate({
  66. "padding": "25px 0",
  67. "top": "58%"
  68. })
  69. })
  70. })