portal html css js resource

l.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>论文分享-科袖网</title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link rel="stylesheet" href="../css/reset.css" />
  8. <link rel="stylesheet" href="../css/common.css" />
  9. <link rel="stylesheet" href="../css/share.css" />
  10. <style>
  11. html,body{background: #FFFFFF;}
  12. </style>
  13. <script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
  14. <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  15. <script type="text/javascript" src="../js/public/shareCom.js"></script>
  16. </head>
  17. <body>
  18. <div class="contentBody2">
  19. <div class="showDetail">
  20. <div class="h1Font hWeight" id="paperName"></div>
  21. <!--内容区-->
  22. <div class="showMain showMainP">
  23. <ul>
  24. <li>
  25. <div class="showTit">期刊:<span class="showCon" id="paperJournal"></span></div>
  26. </li>
  27. <li>
  28. <div class="showTit">期卷:<span class="showCon" id="paperVolume"></span></div>
  29. </li>
  30. <li>
  31. <div class="showTit">摘要:</div>
  32. <div class="showCon" id="paperAbstract">
  33. </div>
  34. </li>
  35. </ul>
  36. </div>
  37. <!--标签模块-->
  38. <ul class="tagList">
  39. </ul>
  40. <div class="madiaBlock">
  41. <div class="madiaTit">作者</div>
  42. <ul class="mui-table-view" id="aboutAuthors">
  43. </ul>
  44. </div>
  45. <div class="madiaBlock displayNone" id="patentModule">
  46. <div class="madiaTit">相关专利</div>
  47. <ul class="mui-table-view" id="patentList">
  48. <!-- <li class="mui-table-view-cell">
  49. <div class="flexCenter OflexCenter mui-clearfix">
  50. <div class="madiaHead patentHead"></div>
  51. <div class="madiaInfo OmadiaInfo">
  52. <p class="ellipsisSty h1Font">CdS/CdSSe轴向异质结纳米线的非对称光波导及双波长激射</p>
  53. <p class="ellipsisSty h2Font">作者:李丹,梁君武,刘华伟,张学红,万强,张清林,潘安练</p>
  54. </div>
  55. </div>
  56. </li>-->
  57. </ul>
  58. </div>
  59. <div class="thumbBlock">
  60. <span class="thumbBtn"><span id="snum"></span></span><!-- thumbedBtn 已赞 201-->
  61. </div>
  62. <div class="madiaBlock displayNone" id="paperModule">
  63. <div class="madiaTit">您可能感兴趣的论文</div>
  64. <ul class="mui-table-view" id="paperList">
  65. </ul>
  66. </div>
  67. <div class="madiaBlock displayNone" style="padding-bottom:50px;" id="leword">
  68. <div class="madiaTit" id="olisten">留言</div>
  69. <ul class="mui-table-view commentBlock noactiveTab">
  70. </ul>
  71. </div>
  72. </div>
  73. <div class="shareEcode">
  74. <img class="Ecodecon" src="../images/ecordCard.jpg" />
  75. <div class="Ecodeinfo">
  76. <a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"><button class="frmbtn frmactive">下载移动客户端</button></a>
  77. </div>
  78. </div>
  79. </div>
  80. <script type="text/javascript">
  81. $(document).ready(function() {
  82. var imgUrl = "http://www.ekexiu.com/images/logo180.png";
  83. var lineLink = document.location.href;
  84. var descContent;
  85. var shareTitle;
  86. var appid = '';
  87. var paperId = GetQueryString("id");
  88. isAgreeNum()
  89. function isAgreeNum() {
  90. var data = {"id": paperId}
  91. $.ajax({
  92. url:"/ajax/ppaper/agreeCount",
  93. data:data,
  94. dataType: 'json', //数据格式类型
  95. type: 'get', //http请求类型
  96. timeout: 10000,
  97. async: true,
  98. success: function(data) {
  99. if(data.success){
  100. $(".thumbBtn").html("赞 <span>" + data.data + "</span>");
  101. }
  102. },
  103. error: function() {
  104. //$.MsgBox.Alert('提示',"服务器链接超时");
  105. }
  106. });
  107. }
  108. leword();
  109. function leword(){
  110. $.ajax({
  111. url:"/ajax/leaveWord/ql/paper",
  112. data: {
  113. "paperId":paperId,
  114. "rows":100 },
  115. dataType: 'json', //服务器返回json格式数据
  116. type: 'get', //HTTP请求类型
  117. timeout: 10000, //超时时间设置为10秒;
  118. traditional: true,
  119. success: function(data) {
  120. if(data.success) {
  121. console.log(data)
  122. if(data.data.length == 0) {
  123. return;
  124. }
  125. $("#leword").show();
  126. for(var i = 0; i < data.data.length; i++) {
  127. var oText = ""
  128. var userType = autho(data.data[i].professor.authType, data.data[i].professor.orgAuth, data.data[i].professor.authStatus);
  129. var baImg = "../images/default-photo.jpg";
  130. if(data.data[i].professor.hasHeadImage == 1) {
  131. baImg = "/images/head/" + data.data[i].professor.id + "_l.jpg";
  132. }
  133. var li = document.createElement("li");
  134. li.innerHTML = '<div class="flexCenter clearfix" data-id="' + data.data[i].professor.id + '">' +
  135. '<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
  136. '<div class="madiaInfo">' +
  137. '<p><span class="h1Font" data-id="' + data.data[i].professor.id + '">' + data.data[i].professor.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
  138. '</div>' +
  139. '</div>' +
  140. '<div class="madiaInfo">' +
  141. '<p class="h2Font">' + data.data[i].content + '</p>' +
  142. '<p class="operateSpan">' +
  143. '<span class="commenttime">' + commenTime(data.data[i].createTime) + '</span>' +
  144. // '<span data-id="' + data.data[i].id + '" class="dele">' + oText + '</span>' +
  145. '</p>' +
  146. '</div>'
  147. document.getElementsByClassName("commentBlock")[0].appendChild(li);
  148. }
  149. }
  150. },
  151. error: function() {
  152. }
  153. });
  154. }
  155. $(".commentBlock").on("click","li>.flexCenter",function(){
  156. location.href="http://" + window.location.host + "/e/p.html?id=" + $(this).attr("data-id");
  157. })
  158. $("body").on("click",".goSpan,.thumbBtn",function(){
  159. location.href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app";
  160. $(this).addClass("activeThis");
  161. })
  162. paperInterestingList()
  163. function paperInterestingList(){
  164. $.ajax({
  165. "url" : "/ajax/ppaper/ralatePapers",
  166. "type" : "GET" ,
  167. "dataType" : "json",
  168. "data" :{
  169. "paperId":paperId
  170. },
  171. //"async":false,
  172. "traditional": true, //传数组必须加这个
  173. "success" : function(data) {
  174. if(data.success) {
  175. console.log(data);
  176. var dataStr=data.data;
  177. var lengthT;
  178. if(dataStr.length>5){
  179. lengthT=5;
  180. }else{
  181. lengthT=dataStr.length
  182. }
  183. if(dataStr.length > 0){
  184. $("#paperModule").show();
  185. var itemlist = '';
  186. for(var i = 0; i < lengthT; i++) {
  187. var itemlist = '<li class="mui-table-view-cell" data-id="'+dataStr[i].id+'">';
  188. itemlist += '<div class="flexCenter OflexCenter mui-clearfix"><div class="madiaHead paperHead"></div>';
  189. itemlist += '<div class="madiaInfo OmadiaInfo">';
  190. itemlist += '<p class="ellipsisSty-2 h1Font">'+ dataStr[i].name +'</p>';
  191. itemlist += '<p class="ellipsisSty h2Font">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  192. itemlist += '</div></div></li>';
  193. $itemlist = $(itemlist);
  194. $("#paperList").append($itemlist);
  195. }
  196. }
  197. }
  198. },
  199. "error":function(){
  200. //$.MsgBox.Alert('提示','链接服务器超时')
  201. }
  202. });
  203. }
  204. $("#paperList").on("click","li",function(){
  205. location.href="http://" + window.location.host + "/e/l.html?id=" + $(this).attr("data-id");
  206. });
  207. $("#patentList").on("click","li",function(){
  208. location.href="http://" + window.location.host + "/e/z.html?id=" + $(this).attr("data-id");
  209. });
  210. getRecourceMe();/*获取信息*/
  211. $.ajax({
  212. "url": "../ajax/ppaper/incPageViews",
  213. "type": "POST",
  214. "dataType": "json",
  215. "data": {
  216. "id": paperId
  217. },
  218. "success": function(data) {
  219. console.log(data);
  220. if(data.success) {}
  221. },
  222. "error": function() {
  223. //$.MsgBox.Alert('提示', '链接服务器超时')
  224. }
  225. });
  226. $("#aboutAuthors").on("click","li",function(){
  227. var oDataId = $(this).attr("data-id");
  228. if(oDataId.substring(0,1)!="#"){
  229. location.href="http://" + window.location.host + "/e/p.html?id=" + oDataId;
  230. $(this).addClass("activeThis");
  231. }
  232. })
  233. function getRecourceMe() {
  234. $.ajax({
  235. url:'../ajax/ppaper/qo',
  236. data: {
  237. 'id': paperId,
  238. },
  239. dataType: 'json', //服务器返回json格式数据
  240. type: 'get', //HTTP请求类型
  241. timeout: 10000, //超时时间设置为10秒;
  242. success: function(data) {
  243. if(data.success) {
  244. var mydata = data.data;
  245. paperHtml(data.data);
  246. getPaperAuthors(data.data.id)
  247. }
  248. },
  249. error: function(e) {
  250. return;
  251. }
  252. });
  253. }
  254. function paperHtml($da) {
  255. //微信再次分享配置
  256. shareTitle = $da.name;
  257. descContent = $da.summary.substring(0,40);
  258. document.title = $da.name;
  259. document.getElementById("paperName").innerHTML = $da.name; //名字
  260. document.getElementById("paperAbstract").innerHTML = $da.summary; //摘要内容
  261. if(!$da.cn4periodical){
  262. $da.cn4periodical=""
  263. }
  264. if(!$da.en4periodical){
  265. $da.en4periodical=""
  266. }
  267. if(!$da.cn4periodical && !$da.en4periodical){
  268. document.getElementById("paperJournal").parentNode.parentNode.style.display="none";
  269. }else{
  270. document.getElementById("paperJournal").innerHTML = $da.cn4periodical +" " + $da.en4periodical;
  271. }
  272. if(!$da.pubDay){
  273. document.getElementById("paperVolume").parentNode.parentNode.style.display="none";
  274. }else{
  275. document.getElementById("paperVolume").innerHTML = $da.pubDay;
  276. }
  277. if($da.keywords != undefined && $da.keywords.length != 0 ){
  278. var subs = new Array();
  279. if($da.keywords.indexOf(',')){
  280. subs = $da.keywords.split(',');
  281. }else{
  282. subs[0] = $da.keywords;
  283. }
  284. var pstr=""
  285. if(subs.length>0){
  286. patentRelatedList(subs)
  287. for (var i = 0; i < subs.length; i++)
  288. {
  289. pstr+='<li><span class="h2Font">'+ subs[i] +'</span></li>'
  290. };
  291. $(".tagList").html(pstr);
  292. }else{
  293. $(".tagList").hide();
  294. }
  295. }
  296. }
  297. /*获取论文作者信息*/
  298. function getPaperAuthors(stritrm) {
  299. $.ajax({
  300. "url":"../ajax/ppaper/authors",
  301. "type": "GET",
  302. "success": function(data) {
  303. if(data.success) {
  304. if(data.data.length>0){
  305. for(var i=0;i<data.data.length;i++){
  306. var authTy="",authTit="",baseInfo="",imgbg="../images/default-photo.jpg";
  307. if(data.data[i].professorId.substring(0, 1) != "#"){
  308. $.ajax({
  309. url:"../ajax/professor/editBaseInfo/" + data.data[i].professorId,
  310. type:"get",
  311. async:true,
  312. success:function($proData){
  313. if($proData.success){
  314. var showPro = $proData.data;
  315. if(showPro.hasHeadImage == 1) {
  316. imgbg = "/images/head/" + showPro.id + "_l.jpg";
  317. } else {
  318. imgbg = "../images/default-photo.jpg";
  319. }
  320. //认证
  321. var oSty = autho(showPro.authType,showPro.orgAuth,showPro.authStatus);
  322. authTy = oSty.sty;
  323. authTit = oSty.title;
  324. var title = showPro.title || "";
  325. var orgName = showPro.orgName || "";
  326. var office = showPro.office || "";
  327. if(orgName!=""){
  328. if(title != "") {
  329. baseInfo = title + "," + orgName;
  330. }else{
  331. if(office!=""){
  332. baseInfo = office + "," + orgName;
  333. }else{
  334. baseInfo = orgName;
  335. }
  336. }
  337. }else{
  338. if(title != "") {
  339. baseInfo = title;
  340. }else{
  341. if(office!=""){
  342. baseInfo = office;
  343. }else{
  344. baseInfo = "";
  345. }
  346. }
  347. }
  348. var liItem = document.createElement("li");
  349. liItem.setAttribute("data-id",showPro.id);
  350. liItem.className = "mui-table-view-cell"
  351. var oString = '<div class="flexCenter mui-clearfix">'
  352. oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
  353. oString += '<div class="madiaInfo"><p><span class="h1Font">'+ showPro.name +'</span><em class="authiconNew '+ authTy +'" title="'+ authTit +'"></em></p>'
  354. oString += '<p class="ellipsisSty h2Font">'+ baseInfo +'</p>'
  355. oString += '</div><div class="goSpan"><span class="attenSpan" data-id="'+showPro.id+'">关注</span></div></div>'
  356. liItem.innerHTML = oString;
  357. document.getElementById("aboutAuthors").appendChild(liItem);
  358. }
  359. }
  360. })
  361. }else{
  362. var liItem = document.createElement("li");
  363. liItem.setAttribute("data-id",data.data[i].professorId);
  364. liItem.className = "mui-table-view-cell"
  365. var oString = '<div class="flexCenter mui-clearfix">'
  366. oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
  367. oString += '<div class="madiaInfo"><p><span class="h1Font">'+ data.data[i].name +'</span></p>'
  368. oString += '</div></div>'
  369. liItem.innerHTML = oString;
  370. document.getElementById("aboutAuthors").appendChild(liItem);
  371. }
  372. }
  373. }
  374. }
  375. },
  376. "data": {
  377. "id": stritrm
  378. },
  379. dataType: "json",
  380. 'error':function() {
  381. //$.MsgBox.Alert('提示', '链接服务器超时')
  382. }
  383. });
  384. }
  385. /*微信分享*/
  386. $.ajax({
  387. url: "../ajax/weixin/jsapiTicket",
  388. type: 'get',
  389. dataType: 'json',
  390. contentType: "application/x-www-form-urlencoded; charset=utf-8",
  391. data: {
  392. 'url': location.href.split('#')[0]
  393. },
  394. success: function(data) {
  395. if(data.data) {
  396. wx.config({
  397. debug: false, //调试模式好犀利
  398. appId: data.data.appId,
  399. timestamp: data.data.timestamp,
  400. nonceStr: data.data.nonceStr,
  401. signature: data.data.signature,
  402. jsApiList: [ // 所有要调用的 API 都要加到这个列表中
  403. "onMenuShareAppMessage",
  404. "onMenuShareTimeline",
  405. "onMenuShareQQ",
  406. "onMenuShareQZone",
  407. "scanQRCode",
  408. ]
  409. });
  410. wx.ready(function() {
  411. // 在这里调用 API
  412. wx.onMenuShareAppMessage({ //分享给朋友
  413. title: shareTitle, // 分享标题
  414. desc: descContent, // 分享描述
  415. link: lineLink, // 分享链接
  416. imgUrl: imgUrl, // 分享图标
  417. success: share_success_callback,
  418. cancel: share_cancel_callback
  419. });
  420. wx.onMenuShareTimeline({ //分享到朋友圈
  421. title: shareTitle, // 分享标题
  422. desc: descContent, // 分享描述
  423. link: lineLink, // 分享链接
  424. imgUrl: imgUrl, // 分享图标
  425. success: share_success_callback,
  426. cancel: share_cancel_callback
  427. });
  428. wx.onMenuShareQQ({ //分享到QQ
  429. title: shareTitle, // 分享标题
  430. desc: descContent, // 分享描述
  431. link: lineLink, // 分享链接
  432. imgUrl: imgUrl, // 分享图标
  433. success: share_success_callback,
  434. cancel: share_cancel_callback
  435. });
  436. wx.onMenuShareQZone({ //分享到QQ空间
  437. title: shareTitle, // 分享标题
  438. desc: descContent, // 分享描述
  439. link: lineLink, // 分享链接
  440. imgUrl: imgUrl, // 分享图标
  441. success: share_success_callback,
  442. cancel: share_cancel_callback
  443. });
  444. });
  445. //分享成功后的回调函数
  446. function share_success_callback() {}
  447. //用户取消分享后执行的回调函数
  448. function share_cancel_callback() {}
  449. }
  450. }
  451. });
  452. function patentRelatedList(array){
  453. $.ajax({
  454. "url":"/ajax/ppatent/assPatents",
  455. "type" : "GET" ,
  456. "dataType" : "json",
  457. "data" :{
  458. "kws":array
  459. },
  460. "traditional": true, //传数组必须加这个
  461. "success" : function(data) {
  462. if(data.success) {
  463. var $data = data.data;
  464. var lengthT;
  465. if($data.length>5){
  466. lengthT=5;
  467. }else{
  468. lengthT=$data.length
  469. }
  470. if($data.length > 0){
  471. document.getElementById("patentModule").style.display="block";
  472. for(var i = 0; i < lengthT; i++) {
  473. var li = document.createElement("li");
  474. li.setAttribute("data-id", $data[i].id);
  475. li.className = "mui-table-view-cell";
  476. li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
  477. '<div class="madiaHead patentHead"></div>' +
  478. '<div class="madiaInfo OmadiaInfo">' +
  479. '<p class="ellipsisSty-2 h1Font">' + $data[i].name + '</p>' +
  480. '<p class="ellipsisSty h2Font">作者:' + $data[i].authors.substring(0, $data[i].authors.length - 1) + '</p>' +
  481. '</div>' +
  482. '</div>'
  483. document.getElementById("patentList").appendChild(li);
  484. }
  485. }
  486. }
  487. },
  488. "error":function(){
  489. plus.nativeUI.toast("服务器链接超时", toastStyle);
  490. }
  491. });
  492. }
  493. })
  494. </script>
  495. </body>
  496. </html>