portal html css js resource

needSure.js 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. $(document).ready(function() {
  2. $(".onlogin .headnavbtn li").eq(0).addClass("navcurrent");
  3. var demandId = GetQueryString("demandId");
  4. var consuId, demandTitle, demandContent, oDemandAim;
  5. loginStatus();//判断个人是否登录
  6. function angleDemand() {
  7. $.ajax({
  8. url: "/ajax/demand/queryOne",
  9. type: "GET",
  10. timeout: 10000,
  11. dataType: "json",
  12. data: {
  13. "demandId": demandId,
  14. },
  15. beforeSend: function() {},
  16. success: function(data, textState) {
  17. if(data.success) {
  18. var $data = data.data;
  19. var oTime, oDemandType;
  20. $("#dialog_consultTitle").text($data.demandTitle);
  21. oTime = $data["createTime"].substr(0, 4) + "年" + $data.createTime.substr(4, 2) + "月" + $data.createTime.substr(6, 2) + "日" +
  22. $data.createTime.substr(8, 2) + ":" + $data.createTime.substr(10, 2);
  23. $("#dialog_consultTime").text(oTime);
  24. if($data.demandType == 1) {
  25. oDemandType = "个人需求"
  26. } else {
  27. oDemandType = "企业需求"
  28. }
  29. $("#dialog_consultType").text(oDemandType);
  30. if($data.demandAim == 1) {
  31. oDemandAim = "技术咨询"
  32. } else if($data.demandAim == 2) {
  33. oDemandAim = "资源咨询"
  34. } else if($data.demandAim == 3) {
  35. oDemandAim = "其他咨询"
  36. }
  37. <<<<<<< HEAD
  38. $("#dialt").text(oDemandAim);
  39. =======
  40. $("#demandt").text(oDemandAim);
  41. >>>>>>> refs/heads/dev
  42. $("#dialog_consultContent").text($data.demandContent);
  43. $("#nameS").text($data.professor.name);
  44. if($data.professor.hasHeadImage == 1) {
  45. $("#headImg").attr("src", "/images/head/" + $data.professor.id + "_l.jpg")
  46. }
  47. //认证
  48. var oSty=autho($data.professor.authType,$data.professor.orgAuth,$data.professor.authStatus);
  49. $("#sta").addClass(oSty.sty);
  50. $("#sta").attr("title",oSty.title)
  51. var oString = todStr($data.professor.title, $data.professor.office, $data.professor.department);
  52. $("#offt").text(oString);
  53. consuId = $data.professor.id;
  54. if(userid==$data.professor.id){
  55. <<<<<<< HEAD
  56. $(".basicBtn").hide();
  57. }
  58. =======
  59. $(".basicBtn").hide();
  60. }
  61. >>>>>>> refs/heads/dev
  62. demandTitle = $data.demandTitle;
  63. demandContent = $data.demandContent;
  64. demandType = $data.demandAim
  65. }
  66. },
  67. error: function(XMLHttpRequest, textStats, errorThrown) {
  68. }
  69. })
  70. }
  71. /*职位职称所属机构*/
  72. function todStr() {
  73. var arr = new Array(),
  74. i;
  75. for(i in arguments) {
  76. if(arguments[i]) {
  77. arr.push(arguments[i])
  78. }
  79. }
  80. return arr.join();
  81. }
  82. angleDemand();
  83. /*确认回复*/
  84. $(".basicBtn").find("span").click(function() {
  85. $.ajax({
  86. url: "/ajax/consult/byDemand",
  87. type: "GET",
  88. timeout: 10000,
  89. dataType: "json",
  90. data: {
  91. "demandId": demandId,
  92. "professorId": userid
  93. },
  94. success: function(data, textState) {
  95. if(data.success) {
  96. //console.log(data)
  97. if(data.data == null) {
  98. $.MsgBox.Confirm("消息", "确认回复此需求?", createConsult)
  99. } else {
  100. location.href="diloags.html?sendId="+userid+"&attrParams=professorId&consultId="+data.data+"&consultStatus=0&assessStatus=0&thanksStatus=0"
  101. }
  102. }
  103. },
  104. error: function(XMLHttpRequest, textStats, errorThrown) {
  105. }
  106. })
  107. })
  108. function createConsult() {
  109. $.ajax({
  110. url: "/ajax/consult",
  111. type: "POST",
  112. timeout: 10000,
  113. data: {
  114. "consultType": oDemandAim,
  115. "consultTitle": demandTitle,
  116. "consultContant": demandContent,
  117. "professorId": userid,
  118. "consultantId": consuId,
  119. "demandId": demandId
  120. },
  121. success: function(data, textState) {
  122. if(data.success) {
  123. location.href="diloags.html?sendId="+userid+"&attrParams=professorId&consultId="+data.data+"&consultStatus=0&assessStatus=0&thanksStatus=0"
  124. }
  125. },
  126. error: function(XMLHttpRequest, textStats, errorThrown) {
  127. }
  128. })
  129. }
  130. })