portal html css js resource

patentShow1.js 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. $(document).ready(function() {
  2. var userid=$.cookie("userid");
  3. var patentId =window.staticPageData.id
  4. if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
  5. location.href="http://" + window.location.host + "/e/z.html?id="+patentId;
  6. }
  7. function Patent() {
  8. this.init();
  9. this.flag = GetQueryString("flag");
  10. }
  11. Patent.prototype.init = function() {
  12. loginYesOrNo()
  13. ifcollectionAbout(patentId,$("#collectBtn"),4);
  14. $("#paperName").text(window.staticPageData.name);
  15. if(window.staticPageData.summary) {
  16. $(".showCon").eq(5).text(window.staticPageData.summary);
  17. }
  18. this.ajax({
  19. url: "/ajax/ppatent/qo",
  20. data: {
  21. id: patentId
  22. },
  23. type: "get",
  24. Fun: this.patentMess
  25. });
  26. this.ajax({
  27. url: "/ajax/ppatent/authors",
  28. data: {
  29. id: patentId
  30. },
  31. type: "get",
  32. Fun: this.patentAuth
  33. });
  34. this.ajax({
  35. url: "/ajax/ppatent/incPageViews",
  36. data: {
  37. id: patentId
  38. },
  39. type: "post",
  40. Fun: this.pageview
  41. });
  42. }
  43. Patent.prototype.ajax = function(obj) {
  44. var $this = this;
  45. $.ajax({
  46. url: obj.url,
  47. data: obj.data,
  48. dataType: 'json', //服务器返回json格式数据
  49. type: obj.type, //HTTP请求类型
  50. timeout: 10000, //超时时间设置为10秒;
  51. traditional: true,
  52. async:false,
  53. success: function(data) {
  54. if(data.success) {
  55. obj.Fun(data.data, $this);
  56. }
  57. },
  58. error: function() {
  59. $this.Fail();
  60. }
  61. });
  62. }
  63. Patent.prototype.Fail = function() {
  64. $.MsgBox.Alert('提示', "服务器链接超时");
  65. }
  66. Patent.prototype.keyword = function($key) {
  67. for(var i in $key.split(",")) {
  68. if(GetQueryString("flag")== 1) {
  69. if($key.split(",").length>=5) {
  70. $(".oinput").parents(".col-w-12").hide();
  71. }
  72. $("#paperSList").append("<li><p class='h2Font'>" + $key.split(",")[i] + "</p><div class='closeThis'></div></li>");
  73. } else {
  74. paperRelatedList($key.split(","));
  75. $(".tagList").append("<li><p class='h2Font'>" + $key.split(",")[i] + "</p></li>");
  76. }
  77. }
  78. }
  79. Patent.prototype.patentMess = function($data, $obj) {
  80. if(GetQueryString("flag") == 1) {
  81. $(".advertItem,.tagList").hide();
  82. hotKey(".oinput", 10);
  83. if($data.keywords) {
  84. $obj.keyword($data.keywords);
  85. }
  86. } else {
  87. $(".oinput").parents(".form-item").hide();
  88. $(".conItem").hide();
  89. if($data.keywords) {
  90. $obj.keyword($data.keywords);
  91. } else {
  92. $(".tagList").hide();
  93. }
  94. }
  95. if($data.name) {
  96. document.title=$data.name;
  97. }
  98. $("#pageview").text($data.pageViews);
  99. if($data.reqCode) {
  100. $(".showCon").eq(0).text($data.reqCode);
  101. } else {
  102. $(".showCon").eq(0).parents("li").hide();
  103. }
  104. if($data.code) {
  105. $(".showCon").eq(1).text($data.code);
  106. } else {
  107. $(".showCon").eq(1).parents("li").hide();
  108. }
  109. $(".showCon").eq(2).text(TimeTr($data.reqDay));
  110. $(".showCon").eq(3).text(TimeTr($data.pubDay));
  111. $(".showCon").eq(4).text($data.reqPerson);
  112. if($data.summary) {
  113. $(".showCon").eq(5).text($data.summary);
  114. }
  115. var weibotitle = $data.name;
  116. var weibourl = window.location.href;
  117. var weibopic = "http://" + window.location.host + "/images/default-patent.jpg";
  118. $("#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");
  119. $obj.bindEvent($obj);
  120. $("#advertisement img").attr("src","/"+$("#advertisement img").attr("src"));
  121. }
  122. Patent.prototype.patentAuth = function($data, $obj) {
  123. for(var i in $data) {
  124. if($data[i].professorId.substring(0, 1) == "#") {
  125. var otr = '<li class="flexCenter"><a data-id="'+ $data[i].professorId +'">' +
  126. '<div class="madiaHead useHead" id="userimg"></div>' +
  127. '<div class="madiaInfo">' +
  128. '<p class="ellipsisSty">' +
  129. '<span class="h1Font" id="name">' + $data[i].name + '</span>' +
  130. '</p>' +
  131. '</div></a>'
  132. if($data[i].name==$.cookie("userName")){
  133. otr += '<div class="goSpan"><span class="ifMe" nflag="1">是我本人</span></div>'
  134. }else{
  135. otr += '<div class="goSpan"><span class="yaoqing">邀请'+
  136. '<div class="shareCode clearfix"><div class="floatL qrcodeUser"></div>'+
  137. '<div class="shareWord floatR"><p>打开微信“扫一扫”,<br/>打开网页后点击屏幕右上角“分享”按钮</p></div>'+
  138. '</div></span></div>'
  139. }
  140. otr += '</li>'
  141. $("#faM .lastBtn").before(otr);
  142. } else {
  143. $obj.ajax({
  144. url: "/ajax/professor/editBaseInfo/" + $data[i].professorId,
  145. data: {},
  146. type: "get",
  147. Fun: $obj.profess
  148. });
  149. }
  150. if($data.length<5){
  151. $("#faM li").css("display","block");
  152. $(".lastBtn").hide();
  153. }else{
  154. $(".lastBtn").find("span").text($data.length);
  155. $("#faM li:lt(3)").css("display","block");
  156. }
  157. if(GetQueryString("flag") == 1){
  158. $("#faM li").css("display","block");
  159. $("#faM li .goSpan").hide();
  160. $(".lastBtn").hide();
  161. }
  162. }
  163. //邀请
  164. $(".goSpan").on("mouseenter",".yaoqing",function(){
  165. $(this).find('.shareCode').stop(true,false).fadeIn();
  166. }).on("mouseleave",".yaoqing",function(){
  167. $(this).find('.shareCode').stop(true,false).fadeOut();
  168. });
  169. //邀请作者
  170. var Qcu=document.getElementsByClassName("qrcodeUser");
  171. for(var i=0;i<Qcu.length;i++){
  172. var qrcode= new QRCode(Qcu[i], {
  173. width : 100,
  174. height : 100
  175. });
  176. makeCode();
  177. }
  178. function makeCode(){
  179. var hurl = window.location.host;
  180. if(userid) {
  181. var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(patentId)+"&d="+s16to64(userid);
  182. } else{
  183. var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(patentId);
  184. }
  185. qrcode.makeCode(elurl);
  186. }
  187. //是我本人
  188. $(".goSpan").on("click",".ifMe",function(){
  189. var oF=$(this).attr("nflag");
  190. if(oF==1){
  191. $.MsgBox.Confirm("提示", "确认这是您发表的专利?", daoRuPatent);
  192. $(this).attr("nflag","0");
  193. }else{
  194. return;
  195. }
  196. });
  197. function daoRuPatent(){
  198. $.ajax({
  199. "url": "/ajax/ppatent/ass",
  200. "type": "POST",
  201. "data": {
  202. id:patentId,
  203. uid:$.cookie("userid"),
  204. author:$.cookie("userName")
  205. },
  206. dataType: "json",
  207. "success": function(data) {
  208. if(data.success) {
  209. if(data.data){
  210. $(".ifMe").text("导入成功").css("background","#ccc");
  211. }
  212. }
  213. },
  214. 'error': function() {
  215. $.MsgBox.Alert('提示', '服务器连接超时!');
  216. }
  217. });
  218. }
  219. }
  220. Patent.prototype.profess = function($data, $obj) {
  221. var img;
  222. var oClass = autho($data.authType, $data.orgAuth, $data.authStatus);
  223. var csAuto, oId;
  224. var arr = [];
  225. arr[0] = $data.title || $data.office;
  226. arr[1] = $data.orgName || "";
  227. if(arr[0]) {
  228. if(arr[1]) {
  229. arr[2] = arr[0] + "," + arr[1]
  230. } else {
  231. arr[2] = arr[0];
  232. }
  233. } else {
  234. arr[2] = "";
  235. }
  236. if($data.hasHeadImage) {
  237. img = "/images/head/" + $data.id + "_l.jpg";
  238. } else {
  239. img = "../images/default-photo.jpg"
  240. }
  241. oId = $data.id;
  242. var otr = '<li class="flexCenter"><a href="" data-id="' + oId + '">' +
  243. '<div class="madiaHead useHead" id="userimg" style="background-image:url(' + img + ')"></div>' +
  244. '<div class="madiaInfo" style="margin-top:-4px">' +
  245. '<p class="ellipsisSty">' +
  246. '<span class="h1Font" id="name">' + $data.name + '</span><em class="authiconNew ' + oClass.sty + '" title="' + oClass.title + '"></em>' +
  247. '</p>' +
  248. '<p class="h2Font ellipsisSty">' + arr[2] + '<p>' +
  249. '</div></a>'
  250. if(oId==userid){
  251. otr += ''
  252. }else{
  253. otr += '<div class="goSpan"><span class="attenSpan">关注</span></div>'
  254. }
  255. otr += '</li>'
  256. var $otr=$(otr);
  257. $("#faM .lastBtn").before($otr);
  258. ifcollectionAbout(oId,$otr.find(".attenSpan"),1);
  259. }
  260. Patent.prototype.bindEvent = function($obj) {
  261. $("#faM").on("click", "li>a", function() {
  262. if(GetQueryString("flag") !=1){
  263. var oDataId = $(this).attr("data-id");
  264. if(oDataId.substring(0,1)!="#"){
  265. $(this).attr("href","/userInforShow.html?professorId="+oDataId);
  266. }else{
  267. $(this).attr("href","javascript:void(0)");
  268. }
  269. }else{
  270. $(this).attr("href","javascript:void(0)");
  271. }
  272. })
  273. $('#attention em').click(function() {
  274. if(userid && userid != "null" && userid != null) {
  275. if($(this).is('.icon-collected')) {
  276. cancelCollectionAbout(patentId,$(this), 4);
  277. } else {
  278. collectionAbout(patentId,$(this), 4);
  279. }
  280. } else {
  281. quickLog();
  282. operatTab();
  283. closeLog();
  284. }
  285. })
  286. $("body").on("click", ".closeThis", function() {
  287. if($(this).parent().length < 5) {
  288. $(this).parents(".keyResult").siblings("div").show();
  289. }
  290. $(this).parent().remove();
  291. });
  292. $("#release").on("click", function() {
  293. $.MsgBox.Confirm("提示", "确认发布该专利?", $obj.pubPatent);
  294. });
  295. $("#delete").on("click", function() {
  296. $.MsgBox.Confirm("提示", "确认删除该专利?", $obj.delePatent);
  297. });
  298. $(".lastBtn").on("click", function() {
  299. $("#faM li").css("display","block");
  300. $(this).hide();
  301. });
  302. $(".tagList").on("click","li",function() {
  303. location.href = "/searchNew.html?searchContent=" + $(this).text() + "&tagflag=5";
  304. });
  305. //点击关注按钮
  306. $("#faM").on('click',"span.attenSpan", function() {
  307. var pId=$(this).parent().siblings("a").attr("data-id");
  308. if(userid && userid != null && userid != "null") {
  309. if($(this).is('.attenedSpan')){
  310. cancelCollectionAbout(pId, $(this),1)
  311. } else {
  312. collectionAbout(pId, $(this),1);
  313. }
  314. }else{
  315. quickLog();
  316. operatTab();
  317. closeLog();
  318. }
  319. });
  320. }
  321. Patent.prototype.pageview = function() {};
  322. Patent.prototype.captiureSubInd = function(subIndu) {
  323. var industrys = $("#" + subIndu + "").find("li");
  324. var industryAll = "";
  325. if(industrys.size() > 0) {
  326. for(var i = 0; i < industrys.size(); i++) {
  327. industryAll += industrys[i].innerText;
  328. industryAll += ',';
  329. };
  330. industryAll = industryAll.substring(0, industryAll.length - 1);
  331. }
  332. return industryAll;
  333. }
  334. Patent.prototype.pubPatent = function() {
  335. var $key = oPent.captiureSubInd("paperSList");
  336. oPent.ajax({
  337. url: "/ajax/ppatent/kw",
  338. data: {
  339. id: patentId,
  340. keywords: $key
  341. },
  342. type: "post",
  343. Fun: oPent.pubsucess
  344. });
  345. }
  346. Patent.prototype.pubsucess = function() {
  347. $.MsgBox.Alert('提示', '专利发布成功!');
  348. $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
  349. location.href = "/patentList.html"
  350. }
  351. Patent.prototype.delePatent = function() {
  352. oPent.ajax({
  353. url: "/ajax/ppatent/cAss",
  354. data: {
  355. id: patentId,
  356. uid:$.cookie("userid")
  357. },
  358. type: "post",
  359. Fun: oPent.delsucess
  360. });
  361. }
  362. Patent.prototype.delsucess = function() {
  363. location.href = "/patentList.html"
  364. }
  365. var oPent = new Patent();
  366. //纠错反馈
  367. $(".footer_tools").hide();
  368. $(".correctSubmit").on("click",function(){
  369. var cntCon=$(this).siblings(".correctCon").val();
  370. var cntUser="";
  371. if(userid && userid != null && userid != "null") {
  372. cntUser = userid;
  373. }
  374. if(cntCon.length>500){
  375. $.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
  376. return;
  377. }else{
  378. $.ajax({
  379. "url": "/ajax/feedback/error/patent",
  380. "type": "POST",
  381. "dataType": "json",
  382. "async": true,
  383. "data": {
  384. "id":patentId,
  385. "cnt":cntCon,
  386. "user":cntUser
  387. },
  388. "success": function(data) {
  389. if(data.success) {
  390. console.log(data);
  391. backSuccessed();
  392. suImg();
  393. }
  394. },
  395. "error": function() {
  396. $.MsgBox.Alert('提示', '链接服务器超时')
  397. }
  398. });
  399. }
  400. })
  401. if( GetQueryString("flag")==1){
  402. $(".feedBack").click(function(){
  403. $("#feedbackBox").fadeToggle();
  404. })
  405. $(".closeFeed").click(function(){
  406. $("#feedbackBox").fadeOut();
  407. })
  408. }else{
  409. $(".footer_tools").show();
  410. $("#messagego").show();
  411. $(".thumbBlock").show();
  412. isAgreeNum()
  413. function isAgreeNum() {
  414. var data = {"id": patentId}
  415. $.ajax({
  416. url:"/ajax/ppatent/agreeCount",
  417. data:data,
  418. dataType: 'json', //数据格式类型
  419. type: 'get', //http请求类型
  420. timeout: 10000,
  421. async: true,
  422. success: function(data) {
  423. if(data.success){
  424. if(userid && userid != "null" && userid != null) {
  425. isAgree(data.data) //文章点赞
  426. } else {
  427. $(".thumbBtn").html("赞 <span>" + data.data + "</span>");
  428. }
  429. }
  430. },
  431. error: function() {
  432. $.MsgBox.Alert('提示',"服务器链接超时");
  433. }
  434. });
  435. }
  436. /*判断论文是否被赞*/
  437. function isAgree(articleAgree) {
  438. var data = {"id": patentId,"uid":userid }
  439. $.ajax({
  440. url:"/ajax/ppatent/agree",
  441. data:data,
  442. dataType: 'json', //数据格式类型
  443. type: 'get', //http请求类型
  444. timeout: 10000,
  445. async: true,
  446. success: function(data) {
  447. if(data.success){
  448. if(data.data){
  449. $(".thumbBtn").html("已赞 <span>"+articleAgree+"</span>");
  450. $(".thumbBtn").addClass("thumbedBtn").css("cursor","auto");
  451. }else{
  452. $(".thumbBtn").html("赞 <span>"+articleAgree+"</span>");
  453. $(".thumbBtn").addClass("thunbgo");
  454. }
  455. }
  456. },
  457. error: function() {
  458. $.MsgBox.Alert('提示',"服务器链接超时");
  459. }
  460. });
  461. }
  462. //论文点击点赞
  463. $('.thumbBlock').on("click",".thunbgo",function(){
  464. if (userid && userid != "null" && userid != null) {
  465. addAgree();
  466. }else{
  467. quickLog();
  468. operatTab();
  469. closeLog();
  470. }
  471. })
  472. /*点赞*/
  473. function addAgree() {
  474. var data = {"uid": userid,"id": patentId}
  475. $.ajax({
  476. url:"/ajax/ppatent/agree",
  477. data:data,
  478. dataType: 'json', //数据格式类型
  479. type: 'POST', //http请求类型
  480. timeout: 10000,
  481. async: true,
  482. success: function(data) {
  483. if(data.success){
  484. var articleAgreeval = $(".thumbBtn span").text();
  485. $(".thumbBtn").html("已赞 <span>"+(parseInt(articleAgreeval)+1)+"</span>");
  486. $(".thumbBtn").addClass("thumbedBtn").css("cursor","auto");
  487. $(".thumbBtn").removeClass("thunbgo");
  488. }
  489. },
  490. error: function() {
  491. $.MsgBox.Alert('提示',"服务器链接超时");
  492. }
  493. });
  494. }
  495. if(userid && userid != "null" && userid != null){
  496. $(".ifLoginOn").removeClass("displayNone");
  497. }else{
  498. $(".ifLoginUn").removeClass("displayNone");
  499. $(".ifLoginUn").on('click',".loginGo", function() {
  500. quickLog();
  501. operatTab();
  502. closeLog();
  503. })
  504. }
  505. /*留言模块*/
  506. limitObj(".msgCont",200)
  507. $("#meSendtt").on("click", function() {
  508. article();
  509. })
  510. //查看更多留言
  511. $("#moreArtical").on("click",function(){
  512. vcreateTime = $(".commentList li").last().attr("data-time");
  513. orderKey = $(".commentList li").last().attr("data-key");
  514. message(5,1);
  515. })
  516. //删除留言
  517. $(".commentList").on("click",".messageDel",function(){
  518. var commenid = $(this).attr("data-id");
  519. articledel(commenid)
  520. })
  521. //发布留言
  522. function article() {
  523. $.ajax({
  524. url:"/ajax/leaveWord/patent",
  525. dataType: 'json', //数据格式类型
  526. type: 'POST', //http请求类型
  527. data: {
  528. "patentId": patentId,
  529. "sender": userid,
  530. "content": $(".msgCont").val(),
  531. },
  532. timeout: 10000, //超时设置
  533. success: function(data) {
  534. var $info = data.data || {};
  535. if(data.success && data.data) {
  536. message(5,2);
  537. }
  538. $(".msgCont").val("");
  539. $(".msgconNum").find("span").text(0);
  540. },
  541. error: function() {
  542. $.MsgBox.Alert('提示', '服务器请求失败')
  543. }
  544. });
  545. }
  546. message(5,2);
  547. function message(rows,num) {
  548. if(num==1){
  549. var data = {"patentId": patentId,"createTime": vcreateTime,"orderKey": orderKey,"rows": rows}
  550. }else{
  551. var data = {"patentId": patentId,"rows": rows}
  552. }
  553. $.ajax({
  554. url: "/ajax/leaveWord/ql/patent",
  555. dataType: 'json', //数据格式类型
  556. type: 'GET', //http请求类型
  557. data: data,
  558. timeout: 10000, //超时设置
  559. success: function(data) {
  560. if(data.success) {
  561. if(data.data != ""){
  562. if(num==2){
  563. $(".commentList").html("");
  564. }
  565. if(data.data.length > 4){
  566. $("#moreArtical").removeClass("displayNone");
  567. }else{
  568. $("#moreArtical").addClass("displayNone");
  569. }
  570. for(var i = 0; i < data.data.length; i++) {
  571. var itemlist = '<li class="flexCenter" data-time="" data-key="">';
  572. itemlist += '<a href class="userhref"> <div class="madiaHead useHead useHeadMsg"></div></a>';
  573. itemlist += '<div class="madiaInfo">';
  574. itemlist += '<p><a href class="userhref"><span class="h1Font messageName">张某某</span></a><em class="authiconNew" title="科袖认证专家"></em><span class="commenttime">9月30号 12:00</span></p>';
  575. itemlist += '<p class="h2Font messageContent">sdfsdfs</p>';
  576. itemlist += '<div class="operateSpan"><span class="callBack">回复</span><span class="messageDel">删除</span></div>';
  577. itemlist += '</div></li>';
  578. $itemlist = $(itemlist);
  579. $(".commentList").append($itemlist);
  580. var datalist = data.data[i];
  581. $itemlist.find(".messageName").text(datalist.professor.name);
  582. $itemlist.find(".messageContent").text(datalist.content);
  583. var userType = autho(datalist.professor.authType, datalist.professor.orgAuth, datalist.professor.authStatus);
  584. $itemlist.find(".authiconNew").attr("title", userType.title);
  585. $itemlist.find(".authiconNew").addClass(userType.sty);
  586. if(datalist.professor.hasHeadImage==1) {
  587. $itemlist.find(".useHeadMsg").attr("style", "background-image: url(/images/head/" + datalist.professor.id + "_l.jpg);");
  588. }
  589. if(datalist.professor.id==userid){
  590. $itemlist.find(".messageDel").show();
  591. }
  592. $itemlist.attr("data-time", datalist.createTime);
  593. $itemlist.attr("data-key", datalist.orderKey);
  594. $itemlist.find(".messageDel").attr("data-id", datalist.id);
  595. $itemlist.find(".userhref").attr("href", "/userInforShow.html?professorId="+datalist.professor.id);
  596. var createtime = datalist.createTime;
  597. $itemlist.find(".commenttime").text(commenTime(createtime));
  598. }
  599. }else{
  600. if(num==2){
  601. $(".commentList").html("");
  602. }else{
  603. $("#moreArtical").addClass("displayNone");
  604. }
  605. }
  606. }
  607. },
  608. error: function() {
  609. $.MsgBox.Alert('提示', '服务器请求失败')
  610. }
  611. });
  612. }
  613. //删除自己的留言
  614. function articledel(commenid) {
  615. $.ajax({
  616. url:"/ajax/leaveWord/delete",
  617. dataType: 'json', //数据格式类型
  618. type: 'POST', //http请求类型
  619. data: {
  620. "id": commenid,
  621. },
  622. timeout: 10000, //超时设置
  623. success: function(data) {
  624. if(data.success) {
  625. message(5,2);
  626. }
  627. },
  628. error: function() {
  629. $.MsgBox.Alert('提示', '服务器请求失败')
  630. }
  631. });
  632. }
  633. //您可能感兴趣的论文
  634. paperInterestingList()
  635. function paperInterestingList(){
  636. $.ajax({
  637. "url" : "/ajax/ppatent/ralatePatents",
  638. "type" : "GET" ,
  639. "dataType" : "json",
  640. "data" :{
  641. "patentId":patentId
  642. },
  643. //"async":false,
  644. "traditional": true, //传数组必须加这个
  645. "success" : function(data) {
  646. if(data.success) {
  647. console.log(data);
  648. var dataStr=data.data
  649. if(dataStr.length > 0){
  650. $("#interPatent").show();
  651. var itemlist = '';
  652. $("#patentList").html("");
  653. for(var i = 0; i < dataStr.length; i++) {
  654. var itemlist = '<li>';
  655. itemlist += '<a class="flexCenter" target="_blank" href="/' + pageUrl("pt",dataStr[i]) +'"><div class="madiaHead patentHead"></div>';
  656. itemlist += '<div class="madiaInfo">';
  657. itemlist += '<p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  658. itemlist += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  659. itemlist += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
  660. itemlist += '</div></a></li>';
  661. $itemlist = $(itemlist);
  662. $("#patentList").append($itemlist);
  663. }
  664. }
  665. }
  666. },
  667. "error":function(){
  668. $.MsgBox.Alert('提示','链接服务器超时')
  669. }
  670. });
  671. }
  672. }
  673. //根据关键词查询查找相关论文
  674. function paperRelatedList(array){
  675. $.ajax({
  676. "url" : "/ajax/ppaper/assPapers",
  677. "type" : "GET" ,
  678. "dataType" : "json",
  679. "data" :{
  680. "kws":array
  681. },
  682. //"async":false,
  683. "traditional": true, //传数组必须加这个
  684. "success" : function(data) {
  685. if(data.success) {
  686. console.log(data);
  687. var dataStr=data.data
  688. if(dataStr.length > 0){
  689. $("#paperList").show();
  690. for(var i = 0; i < dataStr.length; i++) {
  691. var itemlist ='<li style="min-height:56px;"><a href="/'+pageUrl("pp",dataStr[i])+'"><p class="h2Font ellipsisSty-2" style="line-height:20px;"><em class="circlePre"></em>'+ dataStr[i].name +'</p></a></li>'
  692. $(".recentlyList").append(itemlist);
  693. }
  694. }
  695. }
  696. },
  697. "error":function(){
  698. $.MsgBox.Alert('提示', '链接服务器超时')
  699. }
  700. });
  701. }
  702. })