portal html css js resource

l.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  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. function getRecourceMe() {
  237. $.ajax({
  238. url:'../ajax/ppaper/qo',
  239. data: {
  240. 'id': paperId,
  241. },
  242. dataType: 'json', //服务器返回json格式数据
  243. type: 'get', //HTTP请求类型
  244. timeout: 10000, //超时时间设置为10秒;
  245. success: function(data) {
  246. if(data.success) {
  247. var mydata = data.data;
  248. paperHtml(data.data);
  249. getPaperAuthors(data.data.id)
  250. }
  251. },
  252. error: function(e) {
  253. return;
  254. }
  255. });
  256. }
  257. function paperHtml($da) {
  258. //微信再次分享配置
  259. shareTitle = $da.name;
  260. descContent = $da.summary.substring(0,40);
  261. document.title = $da.name;
  262. document.getElementById("paperName").innerHTML = $da.name; //名字
  263. document.getElementById("paperAbstract").innerHTML = $da.summary; //摘要内容
  264. if(!$da.cn4periodical){
  265. $da.cn4periodical=""
  266. }
  267. if(!$da.en4periodical){
  268. $da.en4periodical=""
  269. }
  270. if(!$da.cn4periodical && !$da.en4periodical){
  271. document.getElementById("paperJournal").parentNode.parentNode.style.display="none";
  272. }else{
  273. document.getElementById("paperJournal").innerHTML = $da.cn4periodical +" " + $da.en4periodical;
  274. }
  275. if(!$da.pubDay){
  276. document.getElementById("paperVolume").parentNode.parentNode.style.display="none";
  277. }else{
  278. document.getElementById("paperVolume").innerHTML = $da.pubDay;
  279. }
  280. if($da.keywords != undefined && $da.keywords.length != 0 ){
  281. var subs = new Array();
  282. if($da.keywords.indexOf(',')){
  283. subs = $da.keywords.split(',');
  284. }else{
  285. subs[0] = $da.keywords;
  286. }
  287. var pstr=""
  288. if(subs.length>0){
  289. patentRelatedList(subs)
  290. for (var i = 0; i < subs.length; i++)
  291. {
  292. pstr+='<li><span class="h2Font">'+ subs[i] +'</span></li>'
  293. };
  294. $(".tagList").html(pstr);
  295. }else{
  296. $(".tagList").hide();
  297. }
  298. }
  299. }
  300. /*获取论文作者信息*/
  301. function getPaperAuthors(stritrm) {
  302. $.ajax({
  303. "url":"../ajax/ppaper/authors",
  304. "type": "GET",
  305. "success": function(data) {
  306. if(data.success) {
  307. if(data.data.length>0){
  308. for(var i=0;i<data.data.length;i++){
  309. var authTy="",authTit="",baseInfo="",imgbg="../images/default-photo.jpg";
  310. if(data.data[i].professorId.substring(0, 1) != "#"){
  311. $.ajax({
  312. url:"../ajax/professor/editBaseInfo/" + data.data[i].professorId,
  313. type:"get",
  314. async:true,
  315. success:function($proData){
  316. if($proData.success){
  317. var showPro = $proData.data;
  318. if(showPro.hasHeadImage == 1) {
  319. imgbg = "/images/head/" + showPro.id + "_l.jpg";
  320. } else {
  321. imgbg = "../images/default-photo.jpg";
  322. }
  323. //认证
  324. var oSty = autho(showPro.authType,showPro.orgAuth,showPro.authStatus);
  325. authTy = oSty.sty;
  326. authTit = oSty.title;
  327. var title = showPro.title || "";
  328. var orgName = showPro.orgName || "";
  329. var office = showPro.office || "";
  330. if(orgName!=""){
  331. if(title != "") {
  332. baseInfo = title + "," + orgName;
  333. }else{
  334. if(office!=""){
  335. baseInfo = office + "," + orgName;
  336. }else{
  337. baseInfo = orgName;
  338. }
  339. }
  340. }else{
  341. if(title != "") {
  342. baseInfo = title;
  343. }else{
  344. if(office!=""){
  345. baseInfo = office;
  346. }else{
  347. baseInfo = "";
  348. }
  349. }
  350. }
  351. var liItem = document.createElement("li");
  352. liItem.setAttribute("data-id",showPro.id);
  353. liItem.className = "mui-table-view-cell"
  354. var oString = '<div class="flexCenter mui-clearfix">'
  355. oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
  356. oString += '<div class="madiaInfo"><p><span class="h1Font">'+ showPro.name +'</span><em class="authiconNew '+ authTy +'" title="'+ authTit +'"></em></p>'
  357. oString += '<p class="ellipsisSty h2Font">'+ baseInfo +'</p>'
  358. oString += '</div><div class="goSpan"><span class="attenSpan" data-id="'+showPro.id+'">关注</span></div></div>'
  359. liItem.innerHTML = oString;
  360. document.getElementById("aboutAuthors").appendChild(liItem);
  361. }
  362. }
  363. })
  364. }else{
  365. var liItem = document.createElement("li");
  366. liItem.setAttribute("data-id",data.data[i].professorId);
  367. liItem.className = "mui-table-view-cell"
  368. var oString = '<div class="flexCenter mui-clearfix">'
  369. oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
  370. oString += '<div class="madiaInfo"><p><span class="h1Font">'+ data.data[i].name +'</span></p>'
  371. oString += '</div></div>'
  372. liItem.innerHTML = oString;
  373. document.getElementById("aboutAuthors").appendChild(liItem);
  374. }
  375. }
  376. }
  377. }
  378. },
  379. "data": {
  380. "id": stritrm
  381. },
  382. dataType: "json",
  383. 'error':function() {
  384. //$.MsgBox.Alert('提示', '链接服务器超时')
  385. }
  386. });
  387. }
  388. /*微信分享*/
  389. $.ajax({
  390. url: "../ajax/weixin/jsapiTicket",
  391. type: 'get',
  392. dataType: 'json',
  393. contentType: "application/x-www-form-urlencoded; charset=utf-8",
  394. data: {
  395. 'url': location.href.split('#')[0]
  396. },
  397. success: function(data) {
  398. if(data.data) {
  399. wx.config({
  400. debug: false, //调试模式好犀利
  401. appId: data.data.appId,
  402. timestamp: data.data.timestamp,
  403. nonceStr: data.data.nonceStr,
  404. signature: data.data.signature,
  405. jsApiList: [ // 所有要调用的 API 都要加到这个列表中
  406. "onMenuShareAppMessage",
  407. "onMenuShareTimeline",
  408. "onMenuShareQQ",
  409. "onMenuShareQZone",
  410. "scanQRCode",
  411. ]
  412. });
  413. wx.ready(function() {
  414. // 在这里调用 API
  415. wx.onMenuShareAppMessage({ //分享给朋友
  416. title: shareTitle, // 分享标题
  417. desc: descContent, // 分享描述
  418. link: lineLink, // 分享链接
  419. imgUrl: imgUrl, // 分享图标
  420. success: share_success_callback,
  421. cancel: share_cancel_callback
  422. });
  423. wx.onMenuShareTimeline({ //分享到朋友圈
  424. title: shareTitle, // 分享标题
  425. desc: descContent, // 分享描述
  426. link: lineLink, // 分享链接
  427. imgUrl: imgUrl, // 分享图标
  428. success: share_success_callback,
  429. cancel: share_cancel_callback
  430. });
  431. wx.onMenuShareQQ({ //分享到QQ
  432. title: shareTitle, // 分享标题
  433. desc: descContent, // 分享描述
  434. link: lineLink, // 分享链接
  435. imgUrl: imgUrl, // 分享图标
  436. success: share_success_callback,
  437. cancel: share_cancel_callback
  438. });
  439. wx.onMenuShareQZone({ //分享到QQ空间
  440. title: shareTitle, // 分享标题
  441. desc: descContent, // 分享描述
  442. link: lineLink, // 分享链接
  443. imgUrl: imgUrl, // 分享图标
  444. success: share_success_callback,
  445. cancel: share_cancel_callback
  446. });
  447. });
  448. //分享成功后的回调函数
  449. function share_success_callback() {}
  450. //用户取消分享后执行的回调函数
  451. function share_cancel_callback() {}
  452. }
  453. }
  454. });
  455. function patentRelatedList(array){
  456. $.ajax({
  457. "url":"/ajax/ppatent/assPatents",
  458. "type" : "GET" ,
  459. "dataType" : "json",
  460. "data" :{
  461. "kws":array
  462. },
  463. "traditional": true, //传数组必须加这个
  464. "success" : function(data) {
  465. if(data.success) {
  466. var $data = data.data;
  467. var lengthT;
  468. if($data.length>5){
  469. lengthT=5;
  470. }else{
  471. lengthT=$data.length
  472. }
  473. if($data.length > 0){
  474. document.getElementById("patentModule").style.display="block";
  475. for(var i = 0; i < lengthT; i++) {
  476. var li = document.createElement("li");
  477. li.setAttribute("data-id", $data[i].id);
  478. li.className = "mui-table-view-cell";
  479. li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
  480. '<div class="madiaHead patentHead"></div>' +
  481. '<div class="madiaInfo OmadiaInfo">' +
  482. '<p class="ellipsisSty-2 h1Font">' + $data[i].name + '</p>' +
  483. '<p class="ellipsisSty h2Font">作者:' + $data[i].authors.substring(0, $data[i].authors.length - 1) + '</p>' +
  484. '</div>' +
  485. '</div>'
  486. document.getElementById("patentList").appendChild(li);
  487. }
  488. }
  489. }
  490. },
  491. "error":function(){
  492. plus.nativeUI.toast("服务器链接超时", toastStyle);
  493. }
  494. });
  495. }
  496. })
  497. </script>
  498. </body>
  499. </html>