portal html css js resource

resourceShow.js 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. $(document).ready(function() {
  2. loginStatus(); //判断个人是否登录
  3. var userid = $.cookie("userid");
  4. $(".jqzoom").imagezoom();
  5. $("#thumblist").on("click", "li a", function() {
  6. $(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
  7. $(".jqzoom").attr('src', $(this).find("img").attr("src"));
  8. $(".jqzoom").attr('rel', $(this).find("img").attr("src"));
  9. });
  10. $('.shareWeixin').hover(function() {
  11. $('.shareCode').stop(true, false).fadeToggle();
  12. });
  13. var resourceId = GetQueryString("resourceId");
  14. ifcollectionAbout(resourceId,$("#attention").find("em"), 2)
  15. var professorId = "";
  16. getRecourceMe();
  17. //热门资源
  18. function recentlyRe(num,obj) {
  19. var ourl=num==1?"/ajax/resource/qaOrgPublish":"/ajax/resource/qaProPublish";
  20. $.ajax({
  21. "url" :ourl ,
  22. "type" : "GET" ,
  23. "dataType" : "json",
  24. "data" :obj,
  25. "success" : function(data) {
  26. if (data.success){
  27. var $data=data.data;
  28. var only=false;
  29. if($data.length>1){
  30. $(".recentlyList").parents(".currentBlock").removeClass("displayNone");
  31. var oLeng=$data.length<5?$data.length:5;
  32. for(var i=0;i<oLeng;i++) {
  33. if(resourceId==$data[i].resourceId) {
  34. only=true;
  35. continue;
  36. }
  37. if(only==true) {
  38. if(oLeng<5) {
  39. }else{
  40. oLeng=6;
  41. }
  42. }
  43. var resIM="../images/default-resource.jpg";
  44. if($data[i].images.length) {
  45. resIM='/data/resource/' + $data[i].images[0].imageSrc;
  46. }
  47. var str='<li><a class="flexCenter" style="min-height:46px;" href="resourceShow.html?resourceId="'+$data[i].resourceId+'>'+
  48. '<div class="madiaHead resourceHead" style="width:50px;height:36px;margin-top:-18px;background-image: url('+ resIM +');"></div>'+
  49. '<div class="madiaInfo"><p class="h2Font ellipsisSty-2">'+$data[i].resourceName+'</p></div></a></li>'
  50. $(".recentlyList").append(str);
  51. }
  52. }
  53. }
  54. },
  55. "error":function(){
  56. $.MsgBox.Alert('提示','链接服务器超时')
  57. }
  58. });
  59. }
  60. /*获取资源信息*/
  61. function getRecourceMe() {
  62. $.ajax({
  63. "url": "/ajax/resource/queryOne",
  64. "type": "GET",
  65. "success": function(data) {
  66. console.log(data);
  67. if(data.success) {
  68. resourceHtml(data.data);
  69. var resourceName = data.data.resourceName + "-科袖网";
  70. window.setTimeout(function() {
  71. document.title = resourceName;
  72. }, 500);
  73. }
  74. },
  75. "data": {
  76. "resourceId": resourceId
  77. },
  78. dataType: "json",
  79. 'error': function() {
  80. $.MsgBox.Alert('提示', '服务器连接超时!');
  81. }
  82. });
  83. }
  84. /*合作备注及性能参数存储换行格式*/
  85. function outHTML(selecter) {
  86. var getValue = selecter;
  87. var aa = "";
  88. if(getValue) {
  89. var endValue = ((getValue.replace(/<(.+?)>/gi, "&lt;$1&gt;")).replace(/ /gi, "&nbsp;")).replace(/\n/gi, "|");
  90. var cc = endValue.split("|");
  91. for(var i = 0; i < cc.length; i++) {
  92. aa += cc[i] + '<br/>'
  93. }
  94. }
  95. return aa;
  96. }
  97. /*处理资源html代码*/
  98. function resourceHtml($da) {
  99. $("#resourceName").text($da.resourceName); //名字
  100. $("#application").text($da.supportedServices); //应用用途
  101. if($da.editProfessor) {
  102. $("#person").show();
  103. if($da.orgName) { //所属机构
  104. $("#organizationName").text($da.orgName).parents("li").show();
  105. }
  106. $("#nameS").text($da.editProfessor.name);
  107. if($da.editProfessor.title) {
  108. $("#titleOffice").text($da.editProfessor.title);
  109. } else {
  110. if($da.editProfessor.office) {
  111. $("#titleOffice").text($da.editProfessor.office);
  112. }
  113. }
  114. if($da.editProfessor.orgName) {
  115. $("#orgType").text($da.editProfessor.orgName);
  116. }
  117. professorId = $da.editProfessor.id;
  118. console.log(professorId);
  119. console.log(userid);
  120. if(userid != professorId) {
  121. ifcollectionAbout(professorId,$("#person").find(".attenSpan"), 1)
  122. $(".goSpan").show();
  123. }
  124. var professorFlag = autho($da.editProfessor.authType, $da.editProfessor.orgAuth, $da.editProfessor.authStatus);
  125. $("#authFlag").addClass(professorFlag.sty).attr("title", professorFlag.title);
  126. if($da.editProfessor.hasHeadImage == 1) {
  127. $("#headImg").css("background-image", 'url(/images/head/' + $da.editProfessor.id + '_l.jpg)');
  128. }
  129. recentlyRe(2,{"professorId":professorId})
  130. }else{
  131. $("#enterprise").show();
  132. $(".qiyego").attr('dataid',$da.organization.id);
  133. $(".qiyego").attr("href","cmpInforShow.html?orgId="+$da.organization.id);
  134. if($da.organization.hasOrgLogo) {
  135. $("#companyImg").attr("src", "/images/org/" + $da.organization.id + ".jpg");
  136. }else{
  137. $("#companyImg").attr("src", "/images/default-icon.jpg");
  138. }
  139. if($da.organization.authStatus==3){
  140. $("#QauthFlag").addClass("authicon-com-ok").attr("title", "认证企业");
  141. }
  142. if($da.organization.forShort) {
  143. $("#Qname").text($da.organization.forShort).attr("href","cmpInforShow.html?orgId="+$da.organization.id);
  144. }else{
  145. $("#Qname").text($da.organization.name).attr("href","cmpInforShow.html?orgId="+$da.organization.id);
  146. }
  147. $("#Qindustry").text($da.organization.subject);
  148. $("#QorgType").text(orgTypeShow[$da.organization.orgType])
  149. if(userid){
  150. ifcollectionAbout($da.organization.id,$("#enterprise").find(".attenSpan"), 6)
  151. }
  152. recentlyRe(1,{"orgId":$da.organization.id})
  153. }
  154. if($da.spec) { //厂商型号
  155. $("#modelNumber").text($da.spec).parents("li").show();
  156. }
  157. if($da.parameter) { //性能参数
  158. $("#performancePa").html(outHTML($da.parameter)).parents("li").show();
  159. }
  160. if($da.cooperationNotes) { //合作备注
  161. $("#remarkContent").html(outHTML($da.cooperationNotes)).parents("li").show();
  162. }
  163. if($da.subject) {
  164. var oSub = $da.subject.split(",");
  165. if($da.resourceType==1) {
  166. interestingResources(oSub,$da.professorId,0);
  167. }else{
  168. interestingResources(oSub,$da.orgId,1);
  169. }
  170. var oSt = "";
  171. for(var i = 0; i < oSub.length; i++) {
  172. oSt += '<li><p class="h2Font">' + oSub[i] + '</p></li>'
  173. }
  174. $(".tagList").html(oSt);
  175. } else {
  176. $(".aboutTit:contains('您可能感兴趣的资源')").parent().hide();
  177. }
  178. if($da.descp) { //编辑器
  179. $("#descp").html($da.descp).parents("li").show();
  180. }
  181. var weibotitle = $da.resourceName;
  182. var weibourl = window.location.href;
  183. //return;
  184. if($da.images.length) {
  185. var weibopic = "http://" + window.location.host + "/data/resource/" + $da.images[0].imageSrc;
  186. $("#firstFigure").attr({
  187. "src": "/data/resource/" + $da.images[0].imageSrc,
  188. "rel": "/data/resource/" + $da.images[0].imageSrc
  189. }).parent().attr("href", "/data/resource/" + $da.images[0].imageSrc);
  190. var arr = "";
  191. for(var i = 0; i < $da.images.length; i++) {
  192. if($da.images[i] == $da.images[0]) {
  193. var oString = '<li class="tb-selected">' +
  194. '<div class="tb-pic tb-s66">' +
  195. '<a href="javascript:void(0);">' +
  196. '<img src="/data/resource/' + $da.images[i].imageSrc + '"/>' +
  197. '</a>' +
  198. '</div>' +
  199. '</li>'
  200. } else {
  201. var oString = '<li >' +
  202. '<div class="tb-pic tb-s66">' +
  203. '<a href="javascript:void(0);">' +
  204. '<img src="/data/resource/' + $da.images[i].imageSrc + '"/>' +
  205. '</a>' +
  206. '</div>' +
  207. '</li>'
  208. }
  209. arr += oString;
  210. }
  211. $("#thumblist").html(arr);
  212. } else {
  213. var weibopic = "http://" + window.location.host + "../images/default-resource.jpg";
  214. $("#firstFigure").attr({
  215. "src": '../images/default-resource.jpg',
  216. "rel": '../images/default-resource.jpg'
  217. });
  218. }
  219. $("#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");
  220. }
  221. /*点击名字及头像跳转个人浏览页面*/
  222. $("#nameS,#headImg").click(function() {
  223. location.href = "userInforShow.html?professorId=" + professorId;
  224. })
  225. //关键词标签点击进去搜索
  226. $(".tagList").on("click","li",function(){
  227. var tagText = $(this).find("p").text();
  228. location.href = "searchNew.html?searchContent=" + tagText + "&tagflag=2";
  229. })
  230. /*资源里面相关文章*/
  231. function relatedArticles() {
  232. $.ajax({
  233. "url": "/ajax/resource/articles",
  234. "type": "GET",
  235. "success": function(data) {
  236. console.log(data);
  237. if(data.success) {
  238. if(data.data.length == 0) {
  239. $("#oArticle").parent().hide();
  240. $(".aboutTit:contains('相关文章')").hide();
  241. return;
  242. }
  243. relatedArticlesHtml(data.data);
  244. }
  245. },
  246. "data": {
  247. "resourceId": resourceId,
  248. "rows": 5
  249. },
  250. dataType: "json",
  251. 'error': function() {
  252. $.MsgBox.Alert('提示', '服务器连接超时!');
  253. }
  254. });
  255. }
  256. relatedArticles();
  257. /*资源相关文章html*/
  258. function relatedArticlesHtml($html) {
  259. for(var i = 0; i < $html.length; i++) {
  260. (function(n) {
  261. var oURL;
  262. if($html[i].article.articleType==1) {
  263. oURL="/ajax/professor/baseInfo/" + $html[i].article.professorId;
  264. }else{
  265. oURL="/ajax/org/" + $html[i].article.orgId;
  266. }
  267. $.ajax({
  268. "url":oURL,
  269. "type": "GET",
  270. "success": function(data) {
  271. if(data.success) {
  272. var cmpname="";
  273. if(data.data.forShort){
  274. cmpname=data.data.forShort;
  275. }else{
  276. cmpname=data.data.name;
  277. }
  278. if($html[n].article.articleType==1) {
  279. var stl = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  280. }else {
  281. var stl={};
  282. stl.sty="";
  283. stl.title="";
  284. if(data.data.authStatus==3) {
  285. stl.sty="authicon-com-ok";
  286. stl.title="认证企业";
  287. }
  288. }
  289. var str = ""
  290. str += '<li data-id="' + $html[n].article.articleId + '">'
  291. if($html[n].article.articleImg) {
  292. str += '<div class="madiaHead artHead" style="background-image: url(/data/article/' + $html[n].article.articleImg + ')"></div>'
  293. } else {
  294. str += '<div class="madiaHead artHead"></div>'
  295. }
  296. str += '<div class="madiaInfo" style="margin-top:18px;padding-bottom:8px">'
  297. str += '<p class="h1Font ellipsisSty">' + $html[n].article.articleTitle + '</p>'
  298. str += '<p><span class="h2Font">' + cmpname + '</span><em class="authiconNew ' + stl.sty + '" title="' + stl.title + '"></em></p>'
  299. str += '</div></li>'
  300. $("#oArticle").append(str);
  301. }
  302. },
  303. 'dataType': "json",
  304. 'error': function() {
  305. $.MsgBox.Alert('提示', '服务器连接超时!');
  306. }
  307. });
  308. })(i);
  309. }
  310. }
  311. /*文章跳转*/
  312. $("#oArticle").on("click", "li", function() {
  313. location.href = "articalShow.html?articleId=" + $(this).attr("data-id");
  314. })
  315. /*感兴趣的资源*/
  316. function interestingResources(arry,oId,oNu) {
  317. var oUrl;
  318. var $in={};
  319. $in.keys= arry;
  320. $in.resourceId= resourceId;
  321. if(oNu==0) {
  322. $in.professorId= oId;
  323. oUrl="/ajax/resource/ralateRes";
  324. }else {
  325. $in.orgId= oId;
  326. oUrl="/ajax/resource/orgRalateRes";
  327. }
  328. $.ajax({
  329. "url": oUrl,
  330. "type": "GET",
  331. "success": function(data) {
  332. console.log(data);
  333. if(data.success) {
  334. if(data.data.length == 0) {
  335. $(".aboutTit:contains('您可能感兴趣的资源')").parent().hide();
  336. return;
  337. }
  338. interestingResourcesHtml(data.data);
  339. }
  340. },
  341. "data":$in,
  342. "traditional": true,
  343. dataType: "json",
  344. 'error': function() {
  345. $.MsgBox.Alert('提示', '服务器连接超时!');
  346. }
  347. });
  348. }
  349. /*感兴趣资源的html*/
  350. function interestingResourcesHtml($respond) {
  351. for(var i = 0; i < $respond.length; i++) {
  352. if($respond[i].organization) {
  353. var stl={};
  354. stl.sty="";
  355. stl.title="";
  356. if($respond[i].organization.authStatus==3) {
  357. stl.sty="authicon-com-ok";
  358. stl.title="认证企业";
  359. }
  360. var name="";
  361. if($respond[i].organization.forShort){
  362. name=$respond[i].organization.forShort;
  363. }else{
  364. name=$respond[i].organization.name;
  365. }
  366. }else {
  367. var stl = autho($respond[i].editProfessor.authType, $respond[i].editProfessor.orgAuth, $respond[i].editProfessor.authStatus);
  368. var name= $respond[i].editProfessor.name;
  369. }
  370. var oStr = '';
  371. if($respond[i].images.length) {
  372. oStr += '<li data-id="' + $respond[i].resourceId + '"><div class="madiaHead resouseHead"style="background-image: url(/data/resource/' + $respond[i].images[0].imageSrc + ')"></div>'
  373. } else {
  374. oStr += '<li data-id="' + $respond[i].resourceId + '"><div class="madiaHead resouseHead"></div>'
  375. }
  376. oStr += '<div class="madiaInfo">'
  377. oStr += '<p class="h1Font">' + $respond[i].resourceName + '</p>'
  378. oStr += '<p class="h2Font ellipsisSty">用途:<span>' + $respond[i].supportedServices + '</span></p>'
  379. oStr += '<p><span class="h2Font">' + name + '</span><em class="authiconNew ' + stl.sty + '" title="' + stl.title + '"></em></p>'
  380. oStr += '</div></li>'
  381. $("#resourceList").append(oStr);
  382. }
  383. }
  384. /*点击资源列表*/
  385. $("#resourceList").on("click", "li", function() {
  386. location.href = "resourceShow.html?resourceId=" + $(this).attr("data-id");
  387. })
  388. /*点击咨询*/
  389. $("#consultin").on("click", function() {
  390. clickResouceConsultHandler();
  391. });
  392. $("#expertli").on("click", ".addbtn", function() {
  393. var $this = $(this);
  394. clickResouceConsultHandler($this);
  395. })
  396. /*咨询函数*/
  397. function clickResouceConsultHandler($this) {
  398. if(userid && userid != "null" && userid != null) {
  399. ConsultApply();
  400. if(!professorId) {
  401. concultProInfo($this.attr("data-id")); //专家信息common.js中
  402. } else {
  403. concultProInfo(professorId); //专家信息common.js中
  404. }
  405. //默认选中资源咨询和标题
  406. for(var i = 0; i < $("ul.menucon").children().length; i++) {
  407. $("ul.menucon").children().eq(i).removeClass("clicknow");
  408. $("ul.menucon").children().eq(1).addClass("clicknow");
  409. }
  410. var consultTitleVal = $("#resourceName").text();
  411. $("#consultTitle").val("关于" + consultTitleVal + "的咨询");
  412. //点击的发送
  413. $("#sendConsultBtn").click(function() {
  414. sendConsultHandler(professorId); //common.js中
  415. });
  416. } else {
  417. $.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
  418. $("#mb_btn_ok").val("去登录");
  419. var aele = document.createElement('a');
  420. $("#mb_btnbox").append(aele);
  421. $("#mb_btnbox a").css({
  422. 'display': "block",
  423. 'width': '100%',
  424. 'height': '40px',
  425. 'position': 'absolute',
  426. 'bottom': '-6px',
  427. 'left': '0'
  428. });
  429. aele.setAttribute('href', '../login.html');
  430. }
  431. };
  432. //点击专家关注
  433. $("#person").on("click",'.attenSpan',function() {
  434. if(userid && userid != "null" && userid != null) {
  435. if($(this).is('.attenedSpan')){
  436. cancelCollectionAbout(professorId,$(this), 1)
  437. } else {
  438. collectionAbout(professorId,$(this),1);
  439. }
  440. } else {
  441. $.MsgBox.Alert('提示', "请先登录再进行关注");
  442. $("#mb_btn_ok").val("去登录");
  443. var aele = document.createElement('a');
  444. $("#mb_btnbox").append(aele);
  445. $("#mb_btnbox a").css({
  446. 'display': "block",
  447. 'width': '100%',
  448. 'height': '40px',
  449. 'position': 'absolute',
  450. 'bottom': '-6px',
  451. 'left': '0'
  452. });
  453. aele.setAttribute('href', '../login.html');
  454. }
  455. })
  456. $("#enterprise").on("click",'.attenSpan',function() {
  457. if(userid && userid != "null" && userid != null) {
  458. if($(this).is('.attenedSpan')){
  459. cancelCollectionAbout($(".qiyego").attr('dataid'),$(this), 6)
  460. } else {
  461. collectionAbout($(".qiyego").attr('dataid'),$(this),6);
  462. }
  463. } else {
  464. $.MsgBox.Alert('提示', "请先登录再进行关注");
  465. $("#mb_btn_ok").val("去登录");
  466. var aele = document.createElement('a');
  467. $("#mb_btnbox").append(aele);
  468. $("#mb_btnbox a").css({
  469. 'display': "block",
  470. 'width': '100%',
  471. 'height': '40px',
  472. 'position': 'absolute',
  473. 'bottom': '-6px',
  474. 'left': '0'
  475. });
  476. aele.setAttribute('href', '../login.html');
  477. }
  478. })
  479. //点击资源收藏
  480. $('#attention em').click(function() {
  481. if (userid && userid != "null" && userid != null) {
  482. if($(this).is('.icon-collected')){
  483. cancelCollectionAbout(resourceId,$(this),3)
  484. }else{
  485. collectionAbout(resourceId,$(this),3)
  486. }
  487. } else {
  488. $.MsgBox.Alert('提示', "请先登录再进行收藏");
  489. $("#mb_btn_ok").val("去登录");
  490. var aele = document.createElement('a');
  491. $("#mb_btnbox").append(aele);
  492. $("#mb_btnbox a").css({
  493. 'display': "block",
  494. 'width': '100%',
  495. 'height': '40px',
  496. 'position': 'absolute',
  497. 'bottom': '-6px',
  498. 'left': '0'
  499. });
  500. aele.setAttribute('href', '../login.html');
  501. }
  502. })
  503. //资源浏览量
  504. function pageViewsVal() {
  505. $.ajax({
  506. "url": "/ajax/resource/pageViews",
  507. "type": "POST",
  508. "dataType": "json",
  509. "data": {
  510. "resourceId": resourceId
  511. },
  512. "success": function(data) {
  513. console.log(data);
  514. if(data.success) {}
  515. },
  516. "error": function() {
  517. $.MsgBox.Alert('提示', '链接服务器超时')
  518. }
  519. });
  520. }
  521. pageViewsVal();
  522. selUse();
  523. function selUse() {
  524. $.ajax({
  525. url: "/ajax/resource/qaLinkman",
  526. type: "GET",
  527. timeout: 10000,
  528. dataType: "json",
  529. async: true,
  530. data: {
  531. "resourceId": resourceId,
  532. },
  533. success: function(data, textState) {
  534. console.log(data)
  535. if(data.success) {
  536. unauthUser(data.data);
  537. }
  538. },
  539. error: function(XMLHttpRequest, textStats, errorThrown) {
  540. $.MsgBox.Alert('提示', '服务器请求失败')
  541. }
  542. })
  543. }
  544. function unauthUser($res) {
  545. var osting = ""
  546. for(var i = 0; i < $res.length; i++) {
  547. var img;
  548. var styC = "";
  549. var oClass = autho($res[i].professor.authType, $res[i].professor.orgAuth, $res[i].professor.authStatus);
  550. var oTitle = "";
  551. if($res[i].professor.title) {
  552. oTitle = $res[i].professor.title;
  553. } else {
  554. if($res[i].professor.office) {
  555. oTitle = $res[i].professor.office;
  556. }
  557. }
  558. if($res[i].professor.hasHeadImage) {
  559. img = "/images/head/" + $res[i].professor.id + "_l.jpg";
  560. } else {
  561. img = "../images/default-photo.jpg"
  562. }
  563. var oSt = '<li class="flexCenter">'
  564. oSt += '<div class="madiaHead useHead" id="userimg" style="background-image: url(' + img + ');"></div>'
  565. oSt += '<div class = "madiaInfo">'
  566. oSt += '<p class = "ellipsisSty">'
  567. oSt += '<span class = "h1Font" id="name">' + $res[i].professor.name + '</span><em class="authiconNew ' + oClass.sty + '" title="' + oClass.title + '"></em >'
  568. oSt += '</p>'
  569. oSt += '<p class="h2Font ellipsisSty">' + oTitle + '</p>'
  570. oSt += '</div>'
  571. oSt += '<span class="addbtn" data-id="' + $res[i].professor.id + '">咨询</span>'
  572. oSt += '</li>'
  573. osting += oSt;
  574. }
  575. $("#expertli").html(osting);
  576. }
  577. //纠错反馈
  578. $(".correctSubmit").on("click",function(){
  579. var cntCon=$(this).siblings(".correctCon").val();
  580. var cntUser="";
  581. if(userid && userid != null && userid != "null") {
  582. cntUser = userid;
  583. }
  584. if(cntCon.length>500){
  585. $.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
  586. return;
  587. }else{
  588. $.ajax({
  589. "url": "/ajax/feedback/error/resource",
  590. "type": "POST",
  591. "dataType": "json",
  592. "async": true,
  593. "data": {
  594. "id": resourceId,
  595. "cnt":cntCon,
  596. "user":cntUser
  597. },
  598. "success": function(data) {
  599. if(data.success) {
  600. backSuccessed();
  601. }
  602. },
  603. "error": function() {
  604. $.MsgBox.Alert('提示', '链接服务器超时')
  605. }
  606. });
  607. }
  608. })
  609. })