portal html css js resource

a.html 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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/swiper.min.css" />
  10. <link rel="stylesheet" href="../css/share.css" />
  11. <script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
  12. <script type="text/javascript" src="../js/public/swiper.min.js"></script>
  13. <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  14. <script type="text/javascript" src="../js/public/baseUtil.js"></script>
  15. <script type="text/javascript" src="../js/public/shareCom.js"></script>
  16. <script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>
  17. <script type="text/javascript" src="../js/public/openApp.js"></script>
  18. <script type="text/javascript">
  19. addscript("ad_article_h5_a");
  20. addscript("ad_article_h5_b");
  21. addscript("ad_article_h5_c");
  22. </script>
  23. <style>
  24. html,body {background: #FFFFFF;}
  25. </style>
  26. </head>
  27. <body>
  28. <div class="contentBody2">
  29. <div class="topFu clearfix">
  30. <div class="topLogo floatL"></div>
  31. <div class="goSpan floatR">
  32. <span class="openSpan">打开</span>
  33. </div>
  34. </div>
  35. <div class="showDetail" style="padding-top:56px;">
  36. <div class="h1Font hWeight" id="articleName"></div>
  37. <div class="madiaBlock">
  38. <ul class="mui-table-view noactiveTab">
  39. <li>
  40. <div class="flexCenter clearfix">
  41. <a id="personAL">
  42. <div class="madiaHead useHead" id="messImg"></div>
  43. <div class="madiaInfo">
  44. <p><span class="h1Font ellipsisSty" id="name"></span><em class="authiconNew" title="" id="auth"></em></p>
  45. <p class="h3Font" id="oTime"></p>
  46. </div>
  47. </a>
  48. <div class="goSpan">
  49. <span class="attenSpan">关注</span>
  50. </div>
  51. </div>
  52. </li>
  53. </ul>
  54. </div>
  55. <!--广告模块-->
  56. <div class="madiaBlock advertItem advertItem-A"></div>
  57. <!--文章内容区-->
  58. <div class="showMain" id="articleContent">
  59. </div>
  60. <!--标签模块-->
  61. <ul class="tagList displayNone">
  62. <!--<li>
  63. <span class="h2Font">金属材料工程与腐</span>
  64. </li>-->
  65. </ul>
  66. <div class="madiaBlock displayNone" id="correlationExpert">
  67. <div class="madiaTit">相关专家</div>
  68. <ul class="mui-table-view" id="expertList">
  69. </ul>
  70. </div>
  71. <div class="madiaBlock displayNone" id="resource">
  72. <div class="madiaTit">相关资源</div>
  73. <ul class="mui-table-view" id="resourceList">
  74. </ul>
  75. </div>
  76. <div class="madiaBlock displayNone" id="correlationCompany">
  77. <div class="madiaTit">相关企业</div>
  78. <ul class="mui-table-view" id="companyList">
  79. </ul>
  80. </div>
  81. <!--点赞模块-->
  82. <div class="thumbBlock">
  83. <span class="thumbBtn"><span id="snum"></span></span>
  84. </div>
  85. <!--广告模块-->
  86. <div class="madiaBlock swiper-container advertItem advertItem-B" style="margin:30px 0 10px"></div>
  87. <!--您可能感兴趣的文章-->
  88. <div class="madiaBlock displayNone" id="article">
  89. <div class="madiaTit">您可能感兴趣的文章</div>
  90. <ul class="mui-table-view" id="articleList">
  91. </ul>
  92. </div>
  93. <!--您可能感兴趣的文章-->
  94. <div class="madiaBlock displayNone" id="newarticle">
  95. <div class="madiaTit">最新文章</div>
  96. <ul class="mui-table-view" id="newarticleList">
  97. </ul>
  98. </div>
  99. <!--留言-->
  100. <div class="madiaBlock displayNone">
  101. <div class="madiaTit" id="olisten">留言</div>
  102. <ul class="mui-table-view commentBlock commentsArea">
  103. </ul>
  104. </div>
  105. </div>
  106. <div class="shareEcode">
  107. <!--广告模块-->
  108. <div class="madiaBlock swiper-container advertItem advertItem-C" style="margin:0 9px"></div>
  109. <img class="Ecodecon" src="../images/ecordCard.jpg" />
  110. </div>
  111. </div>
  112. <script type="text/javascript">
  113. $(document).ready(function() {
  114. var imgUrl ="http://www.ekexiu.com/images/logo180.png";
  115. var lineLink = document.location.href;
  116. var descContent="";
  117. var shareTitle;
  118. var appid = '';
  119. var articleId = GetQueryString("id");
  120. module.lWord(articleId,1);
  121. pageViewLog(articleId,3)
  122. wlog("article", articleId, '3')
  123. //进入发布者详情页面
  124. $("#personAL").on("click", function() {
  125. var reType = this.getAttribute("data-type");
  126. if(reType=="1"){
  127. var proId=this.getAttribute("data-id");
  128. location.href="http://" + window.location.host + "/e/p.html?id=" + proId;
  129. }else{
  130. var cmpId=this.getAttribute("data-id");
  131. location.href="http://" + window.location.host + "/e/c.html?id=" + cmpId;
  132. }
  133. })
  134. var this_="../html/professorArticle.html?articleId="+articleId;
  135. wcFresh(this_);
  136. $("body").on("click",".goSpan,.thumbBtn",function(){
  137. isInstalled(this_,true);
  138. $(this).addClass("activeThis");
  139. })
  140. $("#articleList,#newarticleList").on("click","li", function() {
  141. var OdataId=this.getAttribute("data-id");
  142. location.href="http://" + window.location.host + "/e/a.html?id=" + OdataId;
  143. })
  144. $("#resourceList").on("click","li", function() {
  145. var OdataId=this.getAttribute("data-id");
  146. location.href="http://" + window.location.host + "/e/r.html?id=" + OdataId;
  147. })
  148. $("#expertList").on("click","li", function() {
  149. var OdataId=this.getAttribute("data-id");
  150. location.href="http://" + window.location.host + "/e/p.html?id=" + OdataId;
  151. })
  152. $("#companyList").on("click","li", function() {
  153. var OdataId=this.getAttribute("data-id");
  154. location.href="http://" + window.location.host + "/e/c.html?id=" + OdataId;
  155. })
  156. $(".tagList").on("click", "li", function() {
  157. var keyCon=$(this).find(".h2Font").text();
  158. location.href="http://" + window.location.host + "/e/search.html?flag=3&key=" + keyCon;
  159. })
  160. var oArticleModule = {
  161. articleId: GetQueryString("id"),
  162. oAjaxGet: function(url, obj, oType, oFun) {
  163. $.ajax(url,{
  164. data: obj,
  165. dataType: 'json', //服务器返回json格式数据
  166. type: oType, //HTTP请求类型
  167. timeout: 10000, //超时时间设置为10秒;
  168. traditional: true,
  169. success: function(data) {
  170. if(data.success) {
  171. oFun(data.data);
  172. }
  173. },
  174. error: function(e) {
  175. return;
  176. }
  177. });
  178. },
  179. articleMess: function($data) {
  180. console.log($data);
  181. document.getElementById("articleName").innerHTML = $data.articleTitle;
  182. shareTitle=$data.articleTitle;
  183. document.title=$data.articleTitle;
  184. stt = $data.articleImg.substring(0, 9);
  185. imgUrl="http://www.ekexiu.com/data/article/" + stt + $data.articleId + "_s.jpg";
  186. console.log(stt)
  187. if($data.articleContent) {
  188. document.getElementById("articleContent").innerHTML = $data.articleContent;
  189. descContent=document.getElementById("articleContent").innerText.substr(0,70);
  190. }
  191. if($data.subject) {
  192. document.getElementsByClassName("tagList")[0].style.display = "block";
  193. var arr = $data.subject.split(",");
  194. for(var i in arr) {
  195. var oLi = document.createElement("li");
  196. oLi.innerHTML = '<span class="h2Font">' + arr[i] + '</span>'
  197. document.getElementsByClassName("tagList")[0].appendChild(oLi);
  198. }
  199. }
  200. document.getElementById("snum").innerHTML = $data.articleAgree;
  201. document.getElementById("oTime").innerHTML = commenTime($data.publishTime);
  202. document.getElementById("personAL").setAttribute("data-type",$data.articleType);
  203. if($data.articleType == 1) {
  204. oArticleModule.oAjaxGet("../ajax/article/ralateArticles", {
  205. "keys": arr,
  206. "professorId": oArticleModule.oWner,
  207. "articleId": oArticleModule.articleId,
  208. "rows": 5
  209. }, "get", oArticleModule.correlationArticle);
  210. document.getElementById("personAL").setAttribute("data-id",$data.professorId);
  211. oArticleModule.oAjaxGet("../ajax/professor/editBaseInfo/" + $data.professorId, "", "get", oArticleModule.professorMess);
  212. } else {
  213. oArticleModule.oAjaxGet("../ajax/article/ralateArticles", {
  214. "keys": arr,
  215. "orgId": oArticleModule.oWner,
  216. "articleId": oArticleModule.articleId,
  217. "rows": 5
  218. }, "get", oArticleModule.correlationArticle);
  219. document.getElementById("personAL").setAttribute("data-id",$data.orgId);
  220. oArticleModule.oAjaxGet("../ajax/org/" + $data.orgId, "", "get", oArticleModule.business);
  221. }
  222. },
  223. professorMess: function($data) {
  224. console.log($data);
  225. document.getElementById('name').innerHTML = $data.name;
  226. if($data.hasHeadImage == 1) {
  227. document.getElementById("messImg").style.backgroundImage = "url(../images/head/" + $data.id + "_l.jpg" + ")";
  228. }
  229. var userType = autho($data.authType, $data.orgAuth, $data.authStatus);
  230. document.getElementById("auth").classList.add(userType.sty);
  231. },
  232. business: function($data) {
  233. if($data.forShort) {
  234. document.getElementById('name').innerHTML = $data.forShort;
  235. }else{
  236. document.getElementById('name').innerHTML = $data.name;
  237. }
  238. var mgimg="../images/default-icon.jpg";
  239. if($data.hasOrgLogo) {
  240. mgimg="/images/org/" + $data.id + ".jpg";
  241. }
  242. document.getElementById("messImg").classList.add("cmpHead2");
  243. document.getElementById("messImg").innerHTML='<div class="boxBlock"><img class="boxBlockimg" id="companyImg" src="'+ mgimg+'"></div>'
  244. if($data.authStatus == 3) {
  245. document.getElementById("auth").classList.add("authicon-com-ok");
  246. }
  247. },
  248. correlationExpert: function($data) {
  249. if($data.length == 0) {
  250. return;
  251. }
  252. document.getElementById("correlationExpert").classList.remove("displayNone");
  253. for(var i = 0; i < $data.length; i++) {
  254. (function(n) {
  255. oArticleModule.oAjaxGet("../ajax/professor/editBaseInfo/" + $data[n].professorId, "", "get", oArticleModule.expertList);
  256. })(i)
  257. }
  258. },
  259. expertList: function($data) {
  260. var os = "";
  261. if($data.title) {
  262. if($data.orgName) {
  263. os = $data.title + "," + $data.orgName;
  264. } else {
  265. os = $data.title;
  266. }
  267. } else {
  268. if($data.office) {
  269. if($data.orgName) {
  270. os = $data.office + "," + $data.orgName;
  271. } else {
  272. os = $data.office;
  273. }
  274. } else {
  275. if($data.orgName) {
  276. os = $data.orgName;
  277. }
  278. }
  279. }
  280. var baImg = "../images/default-photo.jpg";
  281. if($data.hasHeadImage == 1) {
  282. baImg = "/images/head/" + $data.id + "_l.jpg";
  283. }
  284. var userType = autho($data.authType, $data.orgAuth, $data.authStatus);
  285. var li = document.createElement("li");
  286. li.setAttribute("data-id", $data.id);
  287. li.innerHTML = '<div class="flexCenter clearfix">' +
  288. '<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
  289. '<div class="madiaInfo">' +
  290. '<p><span class="h1Font">' + $data.name + '</span><em class="authiconNew ' + userType.sty + '"></em></p>' +
  291. '<p class="ellipsisSty h2Font">' + os + '</p>' +
  292. '</div>' +
  293. '</div>'
  294. document.getElementById("expertList").appendChild(li);
  295. },
  296. correlationResource: function($data) {
  297. console.log($data);
  298. if($data.length == 0) {
  299. return;
  300. }
  301. document.getElementById("resource").classList.remove("displayNone");
  302. for(var i = 0; i < $data.length; i++) {
  303. oArticleModule.oAjaxGet( "../ajax/resource/queryOne", {
  304. "resourceId": $data[i].resourceId
  305. }, "get", oArticleModule.rsourceList);
  306. }
  307. },
  308. rsourceList: function($data) {
  309. var namepo, userType;
  310. if($data.resourceType == 1) {
  311. namepo = $data.editProfessor.name;
  312. userType = autho($data.editProfessor.authType, $data.editProfessor.orgAuth, $data.editProfessor.authStatus);
  313. } else {
  314. userType = {};
  315. if($data.organization.forShort){
  316. namepo = $data.organization.forShort;
  317. }else{
  318. namepo = $data.organization.name;
  319. }
  320. if($data.organization.authStatus == 3) {
  321. userType.sty = "authicon-com-ok"
  322. }
  323. }
  324. var rImg = "../images/default-resource.jpg";
  325. if($data.images.length>0){
  326. rImg = "/data/resource/" + $data.images[0].imageSrc;
  327. }
  328. var li = document.createElement("li");
  329. li.setAttribute("data-id", $data.resourceId);
  330. li.innerHTML = '<div class="flexCenter OflexCenter clearfix">' +
  331. ' <div class="madiaHead resouseHead" style="background-image:url(' + rImg + ')"></div>' +
  332. '<div class="madiaInfo OmadiaInfo">' +
  333. '<p class="ellipsisSty h1Font">' + $data.resourceName + '</p>' +
  334. '<p><span class="h2Font">' + namepo + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
  335. '<p class="ellipsisSty-2 h2Font">用途:' + $data.supportedServices + '</p>' +
  336. '</div>' +
  337. '</div>'
  338. document.getElementById("resourceList").appendChild(li);
  339. },
  340. correlationArticle: function($data) {
  341. if($data.total) {
  342. if($data.data.length == 0) {
  343. return;
  344. }
  345. }else{
  346. if($data.length == 0) {
  347. return;
  348. }
  349. }
  350. var oo=1;
  351. if($data.total) {
  352. var $data=$data.data;
  353. document.getElementById('newarticle').style.display = "block";
  354. oo=0;
  355. }else{
  356. document.getElementById('article').style.display = "block";
  357. }
  358. for(var i = 0; i < $data.length; i++) {
  359. var ourl, of ;
  360. if($data[i].articleType == 1) {
  361. ourl = "/ajax/professor/editBaseInfo/" + $data[i].professorId; of = 1;
  362. } else {
  363. ourl = "/ajax/org/" + $data[i].orgId; of = 2;
  364. }
  365. var arImg = "../images/default-artical.jpg";
  366. if($data[i].articleImg) {
  367. arImg = "/data/article/" + $data[i].articleImg
  368. }
  369. var title = $data[i].articleTitle;
  370. $.ajax({
  371. url:ourl,
  372. dataType: 'json', //服务器返回json格式数据
  373. type: "get", //HTTP请求类型
  374. timeout: 10000, //超时时间设置为10秒;
  375. async: false,
  376. traditional: true,
  377. success: function(data) {
  378. if(data.success) {
  379. var namepo=""
  380. var li = document.createElement("li");
  381. if( of == 1) {
  382. namepo = data.data.name;
  383. var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  384. li.setAttribute("owner-id", data.data.id);
  385. li.setAttribute("data-type", 1);
  386. } else {
  387. if(data.data.forShort){
  388. namepo = data.data.forShort;
  389. }else{
  390. namepo = data.data.name;
  391. }
  392. var userType = {};
  393. if(data.data.authStatus == 3) {
  394. userType.sty = 'authicon-com-ok'
  395. } else {
  396. userType.sty = "e"
  397. }
  398. li.setAttribute("owner-id", data.data.id);
  399. li.setAttribute("data-type", 2);
  400. }
  401. li.setAttribute("data-id", $data[i].articleId);
  402. li.className = "mui-table-view-cell";
  403. li.innerHTML = '<div class="flexCenter OflexCenter clearfix">' +
  404. '<div class="madiaHead artHead" style="background-image:url(' + arImg + ')"></div>' +
  405. '<div class="madiaInfo OmadiaInfo">' +
  406. '<p class="ellipsisSty-2 h1Font">' + title + '</p>' +
  407. '<p><span class="h2Font" style="margin-right:10px">'+namepo+'</span><span class="time">'+commenTime($data[i].publishTime)+'</span></p>'+
  408. '</div>' +
  409. '</div>'
  410. if(oo==0){
  411. document.getElementById("newarticleList").appendChild(li)
  412. }else{
  413. document.getElementById("articleList").appendChild(li);
  414. }
  415. }
  416. },
  417. error: function() {
  418. }
  419. });
  420. }
  421. },
  422. correlationCompany: function($data) {
  423. console.log($data);
  424. if($data.length == 0) {
  425. return;
  426. }
  427. document.getElementById("correlationCompany").classList.remove("displayNone");
  428. for(var i = 0; i < $data.length; i++) {
  429. oArticleModule.oAjaxGet( "../ajax/org/"+ $data[i].orgId, {
  430. }, "get", oArticleModule.companyList);
  431. }
  432. },
  433. companyList: function($data) {
  434. var baImg = "../images/default-icon.jpg";
  435. if($data.hasHeadImage == 1) {
  436. baImg = "/images/org/" + $data.id + "_l.jpg";
  437. }
  438. var namepo,userType=""
  439. if($data.authStatus == 3){
  440. userType= "authicon-com-ok"
  441. }
  442. if($data.forShort){
  443. namepo = $data.forShort;
  444. }else{
  445. namepo = $data.name;
  446. }
  447. /*应用行业*/
  448. var proOther = "";
  449. if($data.industry) {
  450. proOther = $data.industry.replace(/,/gi, " | ");
  451. }
  452. var li = document.createElement("li");
  453. li.setAttribute("data-id", $data.id);
  454. li.innerHTML = '<div class="flexCenter OflexCenter clearfix">' +
  455. '<div class="madiaHead cmpHead">'+
  456. '<div class="boxBlock"><img class="boxBlockimg companyImg" id="oimg" src="'+ baImg +'"></div>'+
  457. '</div>' +
  458. '<div class="madiaInfo OmadiaInfo">' +
  459. '<p><span class="h1Font">' + namepo + '</span><em class="authiconNew ' + userType + '"></em></p>' +
  460. '<p class="ellipsisSty h2Font">' + proOther + '</p>' +
  461. '</div>' +
  462. '</div>'
  463. document.getElementById("companyList").appendChild(li);
  464. }
  465. }
  466. /*文章详细内容*/
  467. oArticleModule.oAjaxGet("../ajax/article/query", {
  468. articleId: oArticleModule.articleId
  469. }, "get", oArticleModule.articleMess);
  470. oArticleModule.oAjaxGet("../ajax/article/ralatePro", {
  471. "articleId": oArticleModule.articleId
  472. }, "get", oArticleModule.correlationExpert);
  473. oArticleModule.oAjaxGet("../ajax/article/ralateRes", {
  474. "articleId": oArticleModule.articleId
  475. }, "get", oArticleModule.correlationResource);
  476. oArticleModule.oAjaxGet("../ajax/article/ralateOrg", {
  477. "articleId": oArticleModule.articleId
  478. }, "get", oArticleModule.correlationCompany);
  479. oArticleModule.oAjaxGet("/ajax/article/find", {pageSize:5}, "get", oArticleModule.correlationArticle);
  480. /*微信分享*/
  481. $.ajax({
  482. url: "../ajax/weixin/jsapiTicket",
  483. type: 'get',
  484. dataType: 'json',
  485. contentType: "application/x-www-form-urlencoded; charset=utf-8",
  486. data: {
  487. 'url': location.href.split('#')[0]
  488. },
  489. success: function(data) {
  490. if(data.data) {
  491. wx.config({
  492. debug: false, //调试模式好犀利
  493. appId: data.data.appId,
  494. timestamp: data.data.timestamp,
  495. nonceStr: data.data.nonceStr,
  496. signature: data.data.signature,
  497. jsApiList: [ // 所有要调用的 API 都要加到这个列表中
  498. "onMenuShareAppMessage",
  499. "onMenuShareTimeline",
  500. "onMenuShareQQ",
  501. "onMenuShareQZone",
  502. "scanQRCode",
  503. ]
  504. });
  505. wx.ready(function() {
  506. // 在这里调用 API
  507. wx.onMenuShareAppMessage({ //分享给朋友
  508. title: shareTitle, // 分享标题
  509. desc: descContent, // 分享描述
  510. link: lineLink, // 分享链接
  511. imgUrl: imgUrl, // 分享图标
  512. success: share_success_callback,
  513. cancel: share_cancel_callback
  514. });
  515. wx.onMenuShareTimeline({ //分享到朋友圈
  516. title: shareTitle, // 分享标题
  517. desc: descContent, // 分享描述
  518. link: lineLink, // 分享链接
  519. imgUrl: imgUrl, // 分享图标
  520. success: share_success_callback,
  521. cancel: share_cancel_callback
  522. });
  523. wx.onMenuShareQQ({ //分享到QQ
  524. title: shareTitle, // 分享标题
  525. desc: descContent, // 分享描述
  526. link: lineLink, // 分享链接
  527. imgUrl: imgUrl, // 分享图标
  528. success: share_success_callback,
  529. cancel: share_cancel_callback
  530. });
  531. wx.onMenuShareQZone({ //分享到QQ空间
  532. title: shareTitle, // 分享标题
  533. desc: descContent, // 分享描述
  534. link: lineLink, // 分享链接
  535. imgUrl: imgUrl, // 分享图标
  536. success: share_success_callback,
  537. cancel: share_cancel_callback
  538. });
  539. });
  540. //分享成功后的回调函数
  541. function share_success_callback() {}
  542. //用户取消分享后执行的回调函数
  543. function share_cancel_callback() {}
  544. }
  545. }
  546. });
  547. })
  548. </script>
  549. </body>
  550. </html>