portal html css js resource

cmpInforShow.js 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. $(function() {
  2. loginStatus(); //判断个人是否登录
  3. var userid = $.cookie("userid");
  4. var orgId = GetQueryString("orgId");
  5. var oName = "";
  6. if(orgId) {
  7. getCmpInfo(orgId); //获取详细信息
  8. getResource( 10,1, true); //获取发布的资源
  9. getArticle(10, 1, true); //获取发布的文章
  10. getDemands(10,1,true)//获取发布的需求
  11. relevantarticalList();//相关文章
  12. likeExperts();//感兴趣专家
  13. ifcollectionAbout(orgId,$(".goSpan").find(".attenSpan"),6);
  14. //点击关注按钮
  15. $("#attentBtn").on('click', function() {
  16. if(userid && userid != null && userid != "null") {
  17. if($(this).is('.attenedSpan')){
  18. cancelCollectionAbout(orgId,$(this),6)
  19. } else {
  20. collectionAbout(orgId,$(this), 6);
  21. }
  22. }else{
  23. $.MsgBox.Alert("提示", "请先登录再进行关注");
  24. $("#mb_btn_ok").val("去登录");
  25. var aele = document.createElement('a');
  26. $("#mb_btnbox").append(aele);
  27. $("#mb_btnbox a").css({
  28. 'display': "block",
  29. 'width': '100%',
  30. 'height': '40px',
  31. 'position': 'absolute',
  32. 'bottom': '-6px',
  33. 'left': '0'
  34. });
  35. aele.setAttribute('href', '../login.html');
  36. }
  37. });
  38. //点击查看全部资源
  39. $(".coninfobox").on("click", "#seeMoreR", function() {
  40. document.body.scrollTop = document.documentElement.scrollTop = 0;
  41. $(".navconBox ul>li").eq(1).addClass("liNow").siblings().removeClass("liNow");
  42. $("#item1user").hide();
  43. $("#item2user").show();
  44. })
  45. //点击查看全部文章
  46. $(".coninfobox").on("click", "#seeMoreA", function() {
  47. document.body.scrollTop = document.documentElement.scrollTop = 0;
  48. $(".navconBox ul>li").eq(2).addClass("liNow").siblings().removeClass("liNow");
  49. $("#item1user").hide();
  50. $("#item3user").show();
  51. })
  52. }
  53. function subjectShow(data) {
  54. console.log(data)
  55. if(data != undefined && data.length != 0) {
  56. var subs = new Array();
  57. if(data.indexOf(',')) {
  58. subs = data.split(',');
  59. } else {
  60. subs[0] = data;
  61. }
  62. if(subs.length > 0) {
  63. for(var i = 0; i < subs.length; i++) {
  64. $("#subjectShow").append("<li>" + subs[i] + "</li>");
  65. };
  66. }
  67. }
  68. }
  69. function qualificationShow(data) {
  70. if(data != undefined && data.length != 0) {
  71. var subs = new Array();
  72. if(data.indexOf(',')) {
  73. subs = data.split(',');
  74. } else {
  75. subs[0] = data;
  76. }
  77. if(subs.length > 0) {
  78. for(var i = 0; i < subs.length; i++) {
  79. $("#qualification").append("<li><div class='h4tit'>" + subs[i] + "</div></li>");
  80. };
  81. }
  82. }
  83. }
  84. //企业详细信息
  85. function getCmpInfo(orgId) {
  86. $.ajax({
  87. type: "get",
  88. url: "/ajax/org/" + orgId,
  89. async: false,
  90. success: function(data) {
  91. var $info = data.data;
  92. //console.log($info)
  93. if(data.success) {
  94. if($info.hasOrgLogo) {
  95. $("#proHead").attr("src", "/images/org/" + $info.id + ".jpg");
  96. }else{
  97. $("#proHead").attr("src", "/images/default-icon.jpg");
  98. }
  99. if($info.forShort) {
  100. $("#proName").text($info.forShort);
  101. } else {
  102. $("#proName").text($info.name);
  103. }
  104. oName = $info.name;
  105. if($info.authStatus == "3") {
  106. $("#proAuth").addClass("authicon-com-ok");
  107. $("#proAuth").attr("title", "科袖认证企业");
  108. }
  109. if($info.city) {
  110. $("#proAddress").html($info.city + "<span style='margin-right:10px;'></span>");
  111. }
  112. var proOther = "";
  113. if($info.industry) {
  114. proOther = $info.industry.replace(/,/gi, " | ");
  115. }
  116. $("#proOther").text(proOther);
  117. if($info.orgType == "2") {
  118. $("#proTit").html(orgTypeShow[$info.orgType] + "<span style='margin-right:10px;'></span>");
  119. }
  120. var llqtitle = $info.name + "-" + proOther + "科袖网"; //修改浏览器title信息
  121. document.title = llqtitle;
  122. //简介
  123. if($info.descp) {
  124. $("#item1user>.nodatabox").addClass("displayNone");
  125. $("#descpS").parents(".coninfobox").removeClass("displayNone");
  126. $("#descpS").text($info.descp);
  127. } else {
  128. $("#descpS").parents(".coninfobox").addClass("displayNone");
  129. }
  130. //学术领域
  131. if($info.subject) {
  132. $("#item1user>.nodatabox").addClass("displayNone");
  133. $("#subjectShow").parents(".coninfobox").removeClass("displayNone");
  134. subjectShow($info.subject);
  135. } else {
  136. $("#subjectShow").parents(".coninfobox").addClass("displayNone");
  137. }
  138. //企业资质
  139. if($info.qualification) {
  140. qualificationShow($info.qualification);
  141. } else {
  142. $("#qualification").parents(".coninfobox").hide();
  143. }
  144. //企业详情
  145. $("#orgName").text($info.name);
  146. if($info.orgSize) {
  147. //console.log(typeof($info.orgSize),orgSizeShow[$info.orgSize])
  148. $("#orgSize").text(orgSizeShow[$info.orgSize]);
  149. } else {
  150. $("#orgSize").parent("li").hide();
  151. }
  152. if($info.industry) {
  153. $("#orgIndustry").text($info.industry);
  154. } else {
  155. $("#orgIndustry").parent("li").hide();
  156. }
  157. if($info.city) {
  158. $("#orgCity").text($info.city);
  159. } else {
  160. $("#orgCity").parent("li").hide();
  161. }
  162. if($info.orgType) {
  163. $("#orgType").text(orgTypeShow[$info.orgType]);
  164. } else {
  165. $("#orgType").parent("li").hide();
  166. }
  167. if($info.foundTime) {
  168. $("#foundTime").text(TimeTr($info.foundTime));
  169. } else {
  170. $("#foundTime").parent("li").hide();
  171. }
  172. if($info.orgUrl) {
  173. $("#orgUrl").text($info.orgUrl);
  174. } else {
  175. $("#orgUrl").parent("li").hide();
  176. }
  177. if($info.addr) {
  178. $("#cmpAddress").text($info.addr);
  179. } else {
  180. $("#cmpAddress").parent("li").hide();
  181. }
  182. var weibotitle = $info.name;
  183. var weibourl = window.location.href;
  184. var weibopic = "http://" + window.location.host + "/images/org/" + $info.id + ".jpg";
  185. $("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + encodeURIComponent(weibotitle) + "&url=" + encodeURIComponent(weibourl) + "&pic=" + encodeURIComponent(weibopic) + "&content=utf-8" + "&ralateUid=6242830109&searchPic=false&style=simple");
  186. }
  187. },
  188. error: function() {
  189. $.MsgBox.Alert('提示', '链接服务器超时')
  190. }
  191. });
  192. }
  193. //获取资源
  194. function getResource(pageSize, pageNo, isbind) {
  195. $.ajax({
  196. "url": "/ajax/resource/pqOrgPublish",
  197. "type": "get",
  198. "async": false,
  199. "data": {
  200. "orgId": orgId,
  201. "pageSize": pageSize,
  202. "pageNo": pageNo
  203. },
  204. "success": function(data) {
  205. //console.log(data);
  206. if(data.success) {
  207. $("#proResource").html("");
  208. if(data.data.data.length > 0) {
  209. $("#showResource").parents(".coninfobox").removeClass("displayNone");
  210. $("#item1user>.nodatabox").addClass("displayNone");
  211. for(var i = 0; i < data.data.data.length; i++) {
  212. var madiaHead = '';
  213. if(data.data.data[i].images.length) {
  214. madiaHead = '/data/resource/' + data.data.data[i].images[0].imageSrc;
  215. } else {
  216. madiaHead = '/images/default-resource.jpg';
  217. }
  218. var strAdd = '';
  219. strAdd += '<li><a href="resourceShow.html?resourceId=' + data.data.data[i].resourceId + '" class="flexCenter urlgo">';
  220. strAdd += '<div class="madiaHead resouseHead" style="background-image:url(' + madiaHead + ')"></div>';
  221. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + data.data.data[i].resourceName + '</p><p class="h2Font ellipsisSty">应用用途:' + data.data.data[i].supportedServices + '</p></div>';
  222. strAdd += '</a></li>';
  223. var $strAdd = $(strAdd);
  224. $("#proResource").append(strAdd);
  225. if(isbind==true && i==0){
  226. var $strAddO=$(strAdd);
  227. $("#showResource").html("");
  228. $("#showResource").append($strAddO);
  229. }
  230. }
  231. if(isbind == true) {
  232. $(".resoucePageCode").off("click").createPage({
  233. pageCount: Math.ceil(data.data.total / 10),
  234. current: data.data.pageNo,
  235. backFn: function(p) {
  236. $("#proResource").html("");
  237. getResource(10, p, false);
  238. //document.body.scrollTop = document.documentElement.scrollTop = 0;
  239. }
  240. });
  241. }
  242. } else {
  243. $("#item2user .nodatabox").show();
  244. $("#item2user .nodatabox").find(".noContip").text("企业尚未发布任何资源");
  245. }
  246. }
  247. },
  248. "error": function() {
  249. $.MsgBox.Alert("提示", "服务器连接超时")
  250. }
  251. });
  252. }
  253. //获取文章
  254. function getArticle(pageSize, pageNo, isbind) {
  255. $.ajax({
  256. url: "/ajax/article/pqOrgPublish",
  257. dataType: 'json', //数据格式类型
  258. type: 'GET', //http请求类型
  259. data: {
  260. "orgId": orgId,
  261. "pageSize": pageSize,
  262. "pageNo": pageNo
  263. },
  264. timeout: 10000, //超时设置
  265. success: function(data) {
  266. if(data.success) {
  267. $("#proArticel").html("");
  268. if(data.data.data.length > 0) {
  269. $("#showArticle").parents(".coninfobox").removeClass("displayNone");
  270. $("#item1user>.nodatabox").addClass("displayNone");
  271. for(var i = 0; i < data.data.data.length; i++) {
  272. var madiaHead = '/images/default-artical.jpg';
  273. if(data.data.data[i].articleImg) {
  274. madiaHead = '/data/article/' + data.data.data[i].articleImg;
  275. }
  276. if(data.data.data[i].pageViews!=0){
  277. if(data.data.data[i].articleAgree!=0){
  278. sowU='<li><span>阅读量 '+data.data.data[i].pageViews+'</span></li><li><span>赞 '+data.data.data[i].articleAgree+'</span></li>'
  279. }else{
  280. sowU='<li><span>阅读量 '+data.data.data[i].pageViews+'</span></li>'
  281. }
  282. }
  283. var strAdd = '';
  284. strAdd += '<li><a href="articalShow.html?articleId=' + data.data.data[i].articleId + '" class="flexCenter urlgo">';
  285. strAdd += '<div class="madiaHead artHead" style="background-image:url(' + madiaHead + ')"></div>';
  286. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + data.data.data[i].articleTitle + '</p>';
  287. strAdd += '<ul class="h2Font clearfix">';
  288. strAdd += '<li><span class="time">' + commenTime(data.data.data[i].publishTime) + '</span></li>';
  289. strAdd += sowU
  290. strAdd += '<li><span class="comment"></span></li>';
  291. strAdd += '</ul></div>';
  292. strAdd += '</a></li>';
  293. var $strAdd = $(strAdd);
  294. $("#proArticel").append($strAdd);
  295. commentnum(data.data.data[i].articleId, $strAdd) //文章评论数
  296. if(isbind==true && i==0){
  297. var $strAddO = $(strAdd);
  298. $("#showArticle").append($strAddO);
  299. commentnum(data.data.data[0].articleId,$strAddO)
  300. }
  301. }
  302. if(isbind == true) {
  303. $(".expertPageCode").off("click").createPage({
  304. pageCount: Math.ceil(data.data.total / 10),
  305. current: data.data.pageNo,
  306. backFn: function(p) {
  307. $("#proArticel").html("");
  308. getArticle(10, p, false);
  309. //document.body.scrollTop = document.documentElement.scrollTop = 0;
  310. }
  311. });
  312. }
  313. } else {
  314. $("#item3user .nodatabox").show();
  315. $("#item3user .nodatabox").find(".noContip").text("企业尚未发布任何文章");
  316. var i = 0;
  317. $("#item1user").find('.coninfobox').each(function() {
  318. if($(this).css("display") == "none") {
  319. i++;
  320. }
  321. })
  322. if(i == 4) {
  323. $("#item1user").hide();
  324. $(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
  325. $("#item6user").show();
  326. }
  327. }
  328. }
  329. },
  330. error: function() {
  331. return;
  332. }
  333. });
  334. }
  335. //查文章评论数
  336. function commentnum(articleId, $itemlist) {
  337. $.ajax({
  338. "url": "/ajax/leaveWord/lwCount",
  339. "type": "GET",
  340. "dataType": "json",
  341. "async": false,
  342. "data": {
  343. "articleId": articleId
  344. },
  345. "success": function(data) {
  346. if(data.success) {
  347. if(data.data>0){
  348. $itemlist.find(".comment").text("留言 " + data.data);
  349. }
  350. }
  351. },
  352. "error": function() {
  353. $.MsgBox.Alert('提示', '链接服务器超时')
  354. }
  355. });
  356. }
  357. //关注企业数量
  358. function guanzhuNum() {
  359. $.ajax({
  360. "url": "/ajax/watch/countProfessor",
  361. "type": "GET",
  362. "dataType": "json",
  363. "async": true,
  364. "data": {
  365. "id": orgId,
  366. "type": 6
  367. },
  368. "success": function(data) {
  369. if(data.success) {
  370. $("#attenNum").text(data.data);
  371. }
  372. },
  373. "error": function() {
  374. $.MsgBox.Alert('提示', '链接服务器超时')
  375. }
  376. });
  377. }
  378. guanzhuNum();
  379. function comNum() {
  380. $.ajax({
  381. "url": "/ajax/org/regInfo",
  382. "type": "get",
  383. "dataType": "json",
  384. "data": {
  385. "name": oName
  386. },
  387. "success": function(data) {
  388. if(data.success) {
  389. if(data.data) {
  390. var $data = data.data;
  391. var str = "";
  392. if($data.num) {
  393. str += "<li>工商注册号:" + $data.num + "</li>"
  394. }
  395. if($data.code) {
  396. str += "<li>组织机构代码:" + $data.code + "</li>"
  397. }
  398. if($data.creditCode) {
  399. str += "<li>统一信用代码:" + $data.creditCode + "</li>"
  400. }
  401. if($data.type) {
  402. str += "<li>企业类型:" + $data.type + "</li>"
  403. }
  404. if($data.industry) {
  405. str += "<li>行业:" + $data.industry + "</li>"
  406. }
  407. if($data.operatingPeriod) {
  408. str += "<li>营业期限:" + $data.operatingPeriod + "</li>"
  409. }
  410. if($data.dayOfApproval) {
  411. str += "<li>核准日期:" + $data.dayOfApproval + "</li>"
  412. }
  413. if($data.manager) {
  414. str += "<li>登记机关:" + $data.manager + "</li>"
  415. }
  416. if($data.addr) {
  417. str += "<li>注册地址:" + $data.addr + "</li>"
  418. }
  419. if($data.scopeOfBusiness) {
  420. str += "<li>经营范围:" + $data.scopeOfBusiness + "</li>"
  421. }
  422. $("#comMes").html(str);
  423. }else {
  424. $("#comMes").parents(".coninfobox").hide();
  425. }
  426. }else{
  427. $("#comMes").parents(".coninfobox").hide();
  428. }
  429. },
  430. "error": function() {
  431. $.MsgBox.Alert('提示', '链接服务器超时')
  432. }
  433. });
  434. }
  435. comNum();
  436. industryCommerce();
  437. function industryCommerce() {
  438. $.ajax({
  439. "url": "/ajax/org/incPageViews",
  440. "type": "POST",
  441. "dataType": "json",
  442. "async": true,
  443. "data": {
  444. "id": orgId,
  445. },
  446. "success": function(data) {
  447. if(data.success) {
  448. console.log(data);
  449. }
  450. },
  451. "error": function() {
  452. $.MsgBox.Alert('提示', '链接服务器超时')
  453. }
  454. });
  455. }
  456. //相关文章信息
  457. function relevantarticalList(){
  458. $.ajax({
  459. "url" : "/ajax/article/byAssOrg",
  460. "type" : "GET" ,
  461. "dataType" : "json",
  462. "data" :{"id":orgId},
  463. //"async":false,
  464. "traditional": true, //传数组必须加这个
  465. "success" : function(data) {
  466. console.log(data);
  467. if (data.success && data.data!=""){
  468. $("#relateArt").parents(".conBlock").removeClass("displayNone");
  469. var itemlist = '';
  470. $("#relateArt").html("");
  471. for(var i = 0; i < data.data.length; i++) {
  472. var itemlist = '<li class="flexCenter"><a traget="_blank" href="articalShow.html?articleId='+ data.data[i].articleId +'" class="urlgo">';
  473. itemlist += '<p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+data.data[i].articleTitle+'</p>';
  474. itemlist += '</a></li>';
  475. $itemlist = $(itemlist);
  476. $("#relateArt").append($itemlist);
  477. }
  478. }
  479. },
  480. "error":function(){
  481. $.MsgBox.Alert('提示','链接服务器超时')
  482. }
  483. });
  484. }
  485. //感兴趣
  486. function likeExperts(){
  487. $.ajax({
  488. "url": "/ajax/org/ralateOrgs",
  489. "type": "get",
  490. "dataType" : "json",
  491. "data" :{"orgId":orgId},
  492. "success": function(data) {
  493. if(data.success && data.data) {
  494. console.log(data)
  495. var lengthT;
  496. if(data.data.length>5){
  497. lengthT=5;
  498. }else{
  499. lengthT=data.data.length
  500. }
  501. for(var i = 0; i < lengthT; i++) {
  502. var ExpId = data.data[i].id;
  503. likeExpertsList(ExpId);
  504. }
  505. }
  506. },
  507. "error": function() {
  508. $.MsgBox.Alert('提示', '链接服务器超时')
  509. }
  510. });
  511. }
  512. //感兴趣信息
  513. function likeExpertsList(Id){
  514. $.ajax({
  515. "url" : "/ajax/org/"+Id,
  516. "type" : "GET" ,
  517. "dataType" : "json",
  518. "success" : function(data) {
  519. if (data.success && data.data!=""){
  520. $("#relateCmp").parents(".conBlock").removeClass("displayNone");
  521. var itemlist = '<li class="flexCenter"><a traget="_blank" href="" class="urlgo">';
  522. itemlist += '<div class="madiaHead cmpHead" style="width:50px;height:36px;margin-top:-18px;"><div class="boxBlock" style="width: 50px;height: 36px;">';
  523. itemlist += '<img class="boxBlockimg" id="userimg" src="" /></div></div>';
  524. itemlist += '<div class="madiaInfo">';
  525. itemlist += '<p class="clearfix"><span class="h1Font ellipsisSty floatL" style="display:block;max-width:136px" id="userName"></span><em class="authiconNew floatL" title=""></em></p>';
  526. itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
  527. itemlist += '</div></a></li>';
  528. $itemlist = $(itemlist);
  529. $("#relateCmp").append($itemlist);
  530. if(data.data.forShort){
  531. $itemlist.find("#userName").text(data.data.forShort);
  532. }else{
  533. $itemlist.find("#userName").text(data.data.name);
  534. }
  535. $itemlist.find(".urlgo").attr("href", "cmpInforShow.html?orgId="+data.data.id);
  536. if(data.data.authStatus==3){
  537. $itemlist.find(".authiconNew").addClass("authicon-com-ok");
  538. $itemlist.find(".authiconNew").attr("title","科袖认证企业")
  539. }
  540. if(data.data.industry){
  541. $itemlist.find("#usertitle").text(data.data.industry.replace(/,/gi, " | "));
  542. }
  543. if(data.data.hasOrgLogo == 1) {
  544. $itemlist.find("#userimg").attr("src", "/images/org/" + data.data.id + ".jpg");
  545. }else{
  546. $itemlist.find("#userimg").attr("src","images/default-icon.jpg");
  547. }
  548. }
  549. },
  550. "error":function(){
  551. $.MsgBox.Alert('提示','链接服务器超时')
  552. }
  553. });
  554. }
  555. //获取需求
  556. function getDemands(pageSize, pageNo,isbind) {
  557. $.ajax({
  558. url: "/ajax/demand/pq",
  559. type: "GET",
  560. timeout: 10000,
  561. dataType: "json",
  562. data: {
  563. "state":'1',
  564. "oid":orgId,
  565. "pageNo": pageNo,
  566. "pageSize":pageSize
  567. },
  568. beforeSend: function() {
  569. $("#showDemand").append('<img src="../images/loading.gif" class="loading" />');
  570. },
  571. success: function(data) {
  572. if(data.success) {
  573. $("#showDemand").html(" ");
  574. var $info = data.data.data;
  575. if($info.length > 0){
  576. $("#showDemand").parents(".needinfobox").removeClass("displayNone");
  577. $("#item1user>.nodatabox").addClass("displayNone");
  578. for(var i = 0; i < $info.length; i++) {
  579. var liStr=$("<li></li>").appendTo("#showDemand");
  580. demandHtml($info[i],liStr);
  581. }
  582. }else{
  583. $("#showDemand").parents(".needinfobox").addClass("displayNone");
  584. }
  585. }
  586. $(".loading").remove();
  587. },
  588. error: function() {
  589. $.MsgBox.Alert('提示', '链接服务器超时')
  590. }
  591. })
  592. }
  593. function demandHtml($data,liStr) {
  594. var sowU="";
  595. if($data.pageViews!=0){
  596. sowU='<li><span>浏览量 '+$data.pageViews +'</span></li>'
  597. }
  598. var strCon='';
  599. strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
  600. strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
  601. strCon+='<ul class="showliTop h3Font clearfix">'
  602. strCon+='<li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
  603. strCon+= sowU
  604. strCon+='</ul>'
  605. strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
  606. strCon+='<ul class="showli clearfix h3Font">'
  607. if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' }
  608. if($data.duration!=0){ strCon+='<li>预期时长:'+demandDuration[$data.duration]+'</li>' }
  609. if($data.cost!=0){ strCon+='<li>费用预算:'+demandCost[$data.cost]+'</li>' }
  610. if($data.invalidDay){ strCon+='<li>有效期至:'+TimeTr($data.invalidDay)+'</li>' }
  611. strCon+='</ul>'
  612. strCon+='</a>'
  613. $(strCon).appendTo(liStr);
  614. }
  615. //纠错反馈
  616. $(".correctSubmit").on("click",function(){
  617. var cntCon=$(this).siblings(".correctCon").val();
  618. var cntUser="";
  619. if(userid && userid != null && userid != "null") {
  620. cntUser = userid;
  621. }
  622. if(cntCon.length>500){
  623. $.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
  624. return;
  625. }else{
  626. $.ajax({
  627. "url": "/ajax/feedback/error/org",
  628. "type": "POST",
  629. "dataType": "json",
  630. "async": true,
  631. "data": {
  632. "id": orgId,
  633. "cnt":cntCon,
  634. "user":cntUser
  635. },
  636. "success": function(data) {
  637. if(data.success) {
  638. backSuccessed();
  639. }
  640. },
  641. "error": function() {
  642. $.MsgBox.Alert('提示', '链接服务器超时')
  643. }
  644. });
  645. }
  646. })
  647. })