portal html css js resource

l.html 17KB

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