portal html css js resource

paperShow1.js 20KB

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