portal html css js resource

resourceShow.js 19KB

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