news.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <link href="favicon.ico" rel="shortcut icon" type="image/x-icon"/>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  7. <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
  8. <title>NEWS CENTER</title>
  9. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  10. <link href="css/reset.css" rel="stylesheet"/>
  11. <link href="css/style.css?v=0.346785347683" rel="stylesheet"/>
  12. <link href="css/animate.min.css" rel="stylesheet"/>
  13. <style type="text/css">
  14. html,
  15. body {
  16. height: auto;
  17. min-height: 100%;
  18. background: #2C2E34;
  19. }
  20. #projects {
  21. width: 100%;
  22. height: auto;
  23. background: #2C2E34;
  24. max-width: none;
  25. overflow-x: hidden;
  26. overflow-y: auto;
  27. }
  28. .slide-line, .slide-line1 {
  29. background: #fff;
  30. }
  31. </style>
  32. </head>
  33. <body>
  34. <div class="page" id="projects">
  35. <!--top menu-->
  36. <div class="top-menu-news wow fadeInDown" data-wow-delay="1s" data-wow-duration="1s">
  37. <div class="logo">
  38. <a href="javascript:parent.showIndex();"><img class="inner-icon inner-main"
  39. src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_3.png"/></a>
  40. </div>
  41. <div class="menu"><img class="inner-icon inner-menu"
  42. src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_4.png"/></div>
  43. <div class="cases"><a href="javascript:parent.closeNews();parent.showProjects();"><img class="inner-icon inner-artcle"
  44. src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_5.png"/></a>
  45. </div>
  46. </div>
  47. <!--footer news-footer-->
  48. <div class="news-footer">
  49. <div class="mobile-hide news-left">Copyright©2015-2018, elab-plus.com. All rights reserved. | <a class="icpStyle" style="text-decoration:none;" href="http://www.miitbeian.gov.cn"> 沪ICP备15047801号</a></div>
  50. <div class="mobile-hide news-right">上海定卓⽹络科技有限公司 电话:021-50753278 地址:上海市静安区彭江路602号E座408室</div>
  51. <div class="mobile-display news-left" style="visibility: hidden;">Copyright©2015-2018 | <a class="icpStyle" style="text-decoration:none;" href="http://www.miitbeian.gov.cn"> 沪ICP备15047801号</a></div>
  52. </div>
  53. <!--main menu-->
  54. <div class="main-menu-news">
  55. <div class="menu-background"></div>
  56. <!--contact us-->
  57. <div class="menu-contact">
  58. <div class="menu-contact-list">
  59. <div class="menu-contact-map">
  60. <a href="https://m.amap.com/search/mapview/markers=31.287272%2C121.447295%2C%E4%B8%8A%E6%B5%B7%E5%B8%82%E9%9D%99%E5%AE%89%E5%8C%BA%E5%BD%AD%E6%B1%9F%E8%B7%AF602%E5%8F%B7e%E5%BA%A7" target="_blank">
  61. <div class="map-icon">
  62. <img class="map-img" src="https://dm.static.elab-plus.com/elabGuanWang/Location@2x.png">
  63. </div>
  64. <div class="map-address">
  65. <p>地址</p>
  66. </div>
  67. <div class="map-desc">
  68. <p>上海市静安区彭江路602号E座408室</p>
  69. </div>
  70. </a>
  71. </div>
  72. <div class="menu-contact-phone">
  73. <div class="phone-icon">
  74. <img class="phone-img" src="https://dm.static.elab-plus.com/elabGuanWang/Phone@2x.png">
  75. </div>
  76. <div class="phone-address">
  77. <p>电话</p>
  78. </div>
  79. <div class="phone-desc">
  80. <p><a href="tel:02156519508">021-56519508</a></p>
  81. </div>
  82. </div>
  83. <div class="menu-contact-mail">
  84. <div class="email-icon">
  85. <img class="email-img" src="https://dm.static.elab-plus.com/elabGuanWang/Email@2x.png">
  86. </div>
  87. <div class="email-address">
  88. <p>邮件</p>
  89. </div>
  90. <div class="email-desc">
  91. <p><a href="mailto:admin@elab-plus.com">admin@elab-plus.com</a></p>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <!--CONTACT US-->
  97. <div class="menu-close-news"></div>
  98. <ul class="menu-list">
  99. <li class="elab_who">
  100. <a href="javascript:$('.main-menu-news').removeClass('active');parent.closeNews();parent.showWho();">ELAB是谁
  101. <small>WHO IS ELAB</small>
  102. </a>
  103. </li>
  104. <li class="elab_what">
  105. <a href="javascript:$('.main-menu-news').removeClass('active');parent.closeNews();parent.showDo();">ELAB做什么
  106. <small>WHAT ELAB DO</small>
  107. </a>
  108. </li>
  109. <li class="elab_news">
  110. <a href="javascript:$('.main-menu-news').removeClass('active');parent.closeNews();parent.showNews();">新闻中心
  111. <small>NEWS</small>
  112. </a>
  113. </li>
  114. <li class="elab_project">
  115. <a href="javascript:$('.main-menu-news').removeClass('active');parent.closeNews();parent.showProjects();">作品案例
  116. <small>PROJECTS</small>
  117. </a>
  118. </li>
  119. <li class="elab_contact">
  120. <a href="javascript:$('.main-menu-news').removeClass('active');parent.closeNews();parent.showCareers();">加入我们
  121. <small>CAREERS</small>
  122. </a>
  123. </li>
  124. </ul>
  125. </div>
  126. <!--main-->
  127. <div class="news_narrow">
  128. <img class="news_tab_img" src = "https://dm.static.elab-plus.com/elabGuanWang/List@2x.png"/>
  129. </div>
  130. <div class="news-detail" id="iframeParent">
  131. <!--<div class="article-close" id="articleCloseBtn"></div>-->
  132. <!--<iframe frameborder="0" height="100%" scrolling="yes" name="newsIframe" class="news-iframe" width="100%"></iframe>-->
  133. </div>
  134. <div class="news-body">
  135. <div class="news-list"></div>
  136. <div class="news-sample-list"></div>
  137. </div>
  138. </div>
  139. <script src="js/jquery-1.11.3.min.js"></script>
  140. <script src="js/wow.js"></script>
  141. <script>
  142. var btnChange = false;
  143. var iframeShow =false;
  144. // var itemFocus = false;
  145. var markIdx = 0;
  146. var currentIdx = 0;
  147. var lastIdx = 0;
  148. var menuList = ["elab_who","elab_what","elab_news","elab_project","elab_contact"];
  149. var lastClassName ='';
  150. var lineUrl = null;
  151. var item = null;
  152. var articleCloseBtn;
  153. var iframeHtml;
  154. $(function () {
  155. $("news-body").on("touchmove",(e)=>{
  156. if(iframeShow){
  157. e.preventDefault();
  158. }
  159. });
  160. //show menu
  161. $(".menu").on("click", function (e) {
  162. $(".main-menu-news").addClass("active");
  163. });
  164. //close menu
  165. $('.menu-close-news').on('click', function (e) {
  166. $(".main-menu-news").removeClass("active");
  167. });
  168. $('.news-detail').on('click', function (e) {
  169. $(".news-detail").removeClass("active");
  170. iframeShow = false;
  171. lineUrl = "";
  172. item = "";
  173. $(".inner-main").attr("src", "http://yun-image.elab-plus.com/images/contact/1_objects@2x_3.png");
  174. $(".inner-menu").attr("src", "http://yun-image.elab-plus.com/images/contact/1_objects@2x_4.png");
  175. $(".inner-artcle").attr("src", "http://yun-image.elab-plus.com/images/contact/1_objects@2x_5.png");
  176. $(".top-menu-news").css("background-color","#2C2E34");
  177. $("#iframeParent").empty();
  178. });
  179. <!-- menu hover start-->
  180. $('.elab_who').hover(function () {
  181. currentIdx = 1;
  182. },function () {
  183. currentIdx = 0;
  184. });
  185. $('.elab_what').hover(function () {
  186. currentIdx = 2;
  187. },function () {
  188. currentIdx = 0;
  189. });
  190. $('.elab_news').hover(function () {
  191. currentIdx = 3;
  192. },function () {
  193. currentIdx = 0;
  194. });
  195. $('.elab_project').hover(function () {
  196. currentIdx = 4;
  197. },function () {
  198. currentIdx = 0;
  199. });
  200. $('.elab_contact').hover(function () {
  201. currentIdx = 5;
  202. },function () {
  203. currentIdx = 0;
  204. });
  205. <!-- menu hover end -->
  206. <!--mouse over listener start-->
  207. <!--mouse over listener end-->
  208. setInterval(function () {
  209. if(markIdx !== currentIdx){
  210. markIdx = currentIdx;
  211. var link = '';
  212. var empty = true;
  213. // [".elab_who",".elab_what",".elab_news",".elab_project",".elab_contact"]
  214. var currentClassName = '';
  215. switch (markIdx) {
  216. case 0:
  217. link = '';
  218. empty = true;
  219. currentClassName = "";
  220. break;
  221. case 1:
  222. link = 'url(https://dm.static.elab-plus.com/elabGuanWang/elab_what.png)';
  223. empty = false;
  224. currentClassName = "elab_who";
  225. break;
  226. case 2:
  227. link = 'url(https://dm.static.elab-plus.com/elabGuanWang/elab_do.png)';
  228. empty = false;
  229. currentClassName = "elab_what";
  230. break;
  231. case 3:
  232. link = 'url(https://dm.static.elab-plus.com/elabGuanWang/elab_news.png)';
  233. empty = false;
  234. currentClassName = "elab_news";
  235. break;
  236. case 4:
  237. link = 'url(https://dm.static.elab-plus.com/elabGuanWang/elab_project.png)';
  238. empty = false;
  239. currentClassName = "elab_project";
  240. break;
  241. case 5:
  242. link = 'url(https://dm.static.elab-plus.com/elabGuanWang/elab_join.png)';
  243. empty = false;
  244. currentClassName = "elab_contact";
  245. break;
  246. }
  247. if(empty){
  248. $(".menu-background").fadeOut(400,function () {
  249. $(".menu-background").css('background-image',link);
  250. });
  251. }else {
  252. if(lastIdx!==0){
  253. $(".menu-background").fadeOut(400,function () {
  254. $(".menu-background").css('background-image',link);
  255. $(".menu-background").fadeIn(800);
  256. });
  257. }else {
  258. $(".menu-background").css('background-image',link);
  259. $(".menu-background").fadeIn(800);
  260. }
  261. }
  262. lastIdx = markIdx;
  263. lastClassName = currentClassName;
  264. }
  265. },1210);
  266. var $_list;
  267. var $_listV;
  268. // 192.168.0.16
  269. //读取分类数据 106.14.225.13(正式)
  270. $.get("http://106.14.225.13:8081/rest/listNews", function (result) {
  271. console.log("Result Data:" + JSON.stringify(result.result));
  272. window.newsList = result.result;
  273. $_list = result.result;
  274. $_listV = result.result;
  275. handleModuleShow();
  276. });
  277. /**
  278. * 网格显示
  279. * */
  280. function handleModuleShow() {
  281. if ($_list.length > 0) {
  282. $(".news-list").empty();//清空demo $_list.length
  283. for (var i = 0; i < $_list.length; i+=3) {
  284. var tmp0 = $_list[i];
  285. var tmp1 = $_list[i+1];
  286. var tmp2 = $_list[i+2];
  287. var $_t = 0.1;
  288. if (i < 2) {
  289. $_t = (1 + i) * 0.2;
  290. }
  291. console.log($_t);
  292. // console.log('$_img:' + $_img);
  293. var $_html = '';
  294. if (tmp0 && tmp1 && tmp2) {
  295. var $_img0 = tmp0['bgImage'] || 'http://yun-image.elab-plus.com/images/projects/1_objects@2x_14.jpg';
  296. var $_img1 = tmp1['bgImage'] || 'http://yun-image.elab-plus.com/images/projects/1_objects@2x_14.jpg';
  297. var $_img2 = tmp2['bgImage'] || 'http://yun-image.elab-plus.com/images/projects/1_objects@2x_14.jpg';
  298. var data0 = new Date(tmp0['created']);
  299. var data1 = new Date(tmp1['created']);
  300. var data2 = new Date(tmp2['created']);
  301. if(this.isSafari()){
  302. data0 = new Date(this.getDateForSafari(tmp0['created']));
  303. data1 = new Date(this.getDateForSafari(tmp1['created']));
  304. data2 = new Date(this.getDateForSafari(tmp2['created']));
  305. }
  306. console.log("tmp0['created']:"+tmp0['created']);
  307. console.log("data0:"+data0.getFullYear());
  308. console.log("data0:"+data0.getMonth());
  309. console.log("data0:"+data0.getDate());
  310. $_html = `<div class="newsItem_1 " target="_self" onclick="turnToArticle(${i})" >
  311. <img class="itemBg" src="${$_img0}"/>
  312. <div class="newsItem-mark item-inner"><a>${tmp0['tag']}</a></div>
  313. <div class="item-title item-inner">${tmp0['title']}<p>${tmp0['subTitle']}</p></div>
  314. <div class="item-time item-time-inner"><p>${data0.getFullYear()+'.'+(data0.getMonth()+1)+'.'+data0.getDate()}</p></div>
  315. </div>
  316. <div class="newsBody">
  317. <div class="newsItem_2" target="_self" onclick="turnToArticle(${i+1})">
  318. <img class="itemBg" src="${$_img1}" />
  319. <div class="newsItem-mark item-inner"><a>${tmp1['tag']}</a></div>
  320. <div class="item-title item-inner item-title-sub">${tmp1['title']}<p>${tmp1['subTitle']}</p></div>
  321. <div class="item-time item-time-inner"><p>${data1.getFullYear()+'.'+(data1.getMonth()+1)+'.'+data1.getDate()}</p></div>
  322. </div>
  323. <div class="newsItem_3 " target="_self" onclick="turnToArticle(${i+2})">
  324. <img class="itemBg" src="${$_img2}" />
  325. <div class="newsItem-mark item-inner"><a>${tmp2['tag']}</a></div>
  326. <div class="item-title item-inner item-title-sub">${tmp2['title']}<p>${tmp2['subTitle']}</p></div>
  327. <div class="item-time item-time-inner"><p>${data2.getFullYear()+'.'+(data2.getMonth()+1)+'.'+data2.getDate()}</p></div>
  328. </div>
  329. </div>
  330. `;
  331. }else if (tmp0 && tmp1 && !tmp2) {
  332. var $_img0 = tmp0['bgImage'] || 'http://yun-image.elab-plus.com/images/projects/1_objects@2x_14.jpg';
  333. var $_img1 = tmp1['bgImage'] || 'http://yun-image.elab-plus.com/images/projects/1_objects@2x_14.jpg';
  334. var data0 = new Date(tmp0['created']);
  335. var data1 = new Date(tmp1['created']);
  336. if(this.isSafari()){
  337. data0 = new Date(this.getDateForSafari(tmp0['created']));
  338. data1 = new Date(this.getDateForSafari(tmp1['created']));
  339. }
  340. $_html = `
  341. <div class="newsBody">
  342. <div class="newsItem_2 " target="_self" onclick="turnToArticle(${i})">
  343. <img class="itemBg" src="${$_img0}"/>
  344. <div class="newsItem-mark item-inner"><a>${tmp0['tag']}</a></div>
  345. <div class="item-title item-inner item-title-sub">${tmp0['title']}<p>${tmp0['subTitle']}</p></div>
  346. <div class="item-time item-time-inner"><p>${data0.getFullYear()+'.'+(data0.getMonth()+1)+'.'+data0.getDate()}</p></div>
  347. </div>
  348. <div class="newsItem_3 " target="_self" onclick="turnToArticle(${i+1})">
  349. <img class="itemBg" src="${$_img1}" />
  350. <div class="newsItem-mark item-inner"><a>${tmp1['tag']}</a></div>
  351. <div class="item-title item-inner item-title-sub">${tmp1['title']}<p>${tmp1['subTitle']}</p></div>
  352. <div class="item-time item-time-inner"><p>${data1.getFullYear()+'.'+(data1.getMonth()+1)+'.'+data1.getDate()}</p></div>
  353. </div>
  354. </div>
  355. `;
  356. }else if(tmp0 && !tmp1 && !tmp2){
  357. var $_img0 = tmp0['bgImage'] || 'http://yun-image.elab-plus.com/images/projects/1_objects@2x_14.jpg';
  358. var data0 = new Date(tmp0['created']);
  359. if(this.isSafari()){
  360. data0 = new Date(this.getDateForSafari(tmp0['created']));
  361. }
  362. $_html = `
  363. <div class="newsBody">
  364. <div class="newsItem_2" target="_self" onclick="turnToArticle(${i}})">
  365. <img class="itemBg" src="${$_img0}"/>
  366. <div class="newsItem-mark item-inner"><a>${tmp0['tag']}</a></div>
  367. <div class="item-title item-inner item-title-sub">${tmp0['title']}<p>${tmp0['subTitle']}</p></div>
  368. <div class="item-time item-time-inner"><p>${data0.getFullYear()+'.'+(data0.getMonth()+1)+'.'+data0.getDate()}</p></div>
  369. </div>
  370. </div>
  371. `;
  372. }
  373. $(".news-sample-list").append($_html);
  374. }
  375. }
  376. }
  377. /**
  378. * 列表显示
  379. * @param list
  380. */
  381. function handleListShow() {
  382. // var list = [];
  383. console.log('handleListShow:'+JSON.stringify($_listV));
  384. for(var i=0;i<$_listV.length;i+=2){
  385. var item1 = $_listV[i];
  386. var item2 = $_listV[i+1];
  387. var $_t = (1 + i) * 0.2;
  388. var $_html = '';
  389. if(item2 && item1){
  390. $_html = `<div class="news-list-item wow fadeInUp" data-wow-duration="0.8s" data-wow-delay="${$_t}s">
  391. <div class="news-list-item-left" onclick="turnToArticle(${i})">
  392. <div class="news-list-item-box"><p>${$_listV.length-i}</p></div>
  393. <div class="news-list-item-description">
  394. <div class="news-list-item-title"><p>${item1['title'].replace("<br>","")}</p></div>
  395. <div class="news-list-item-bottom"></div>
  396. </div>
  397. </div>
  398. <div class="news-list-item-right" onclick="turnToArticle(${(i+1)})">
  399. <div class="news-list-item-box"><p>${$_listV.length-i-1}</p></div>
  400. <div class="news-list-item-description">
  401. <div class="news-list-item-title"><p>${item2['title'].replace("<br>","")}</p></div>
  402. <div class="news-list-item-bottom"></div>
  403. </div>
  404. </div>
  405. </div>
  406. `;
  407. }else if(!item2 && item1){
  408. $_html = `<div class="news-list-item wow fadeInUp" data-wow-duration="0.8s" data-wow-delay="${$_t}s">
  409. <div class="news-list-item-left" onclick="turnToArticle(${(i)})">
  410. <div class="news-list-item-box"><p>${$_listV.length-i}</p></div>
  411. <div class="news-list-item-description">
  412. <div class="news-list-item-title"><p>${item1['title'].replace("<br>","")}</p></div>
  413. <div class="news-list-item-bottom"></div>
  414. </div>
  415. </div>
  416. <div class="news-list-item-divideHeight"></div>
  417. </div>
  418. `;
  419. }
  420. $(".news-list").append($_html);
  421. }
  422. var $_bottomHtml = `
  423. <div class="newsListBottom>
  424. </div>
  425. `;
  426. $(".news-list").append($_bottomHtml);
  427. }
  428. function lishChange() {
  429. btnChange = !btnChange;
  430. if(btnChange){
  431. // <img class="news_tab_img" src = "https://dm.static.elab-plus.com/elabGuanWang/Showroom@2x.png"/>
  432. $(".news_tab_img").attr("src", "https://dm.static.elab-plus.com/elabGuanWang/Showroom@2x.png");
  433. $(".news-sample-list").empty();
  434. handleListShow();
  435. // background-color: #2C2E34
  436. $(".news-body").css("padding-top","5%");
  437. }else {
  438. $(".news_tab_img").attr("src", "https://dm.static.elab-plus.com/elabGuanWang/List@2x.png");
  439. $(".news-list").empty();
  440. handleModuleShow();
  441. $(".top-menu-news").css("background-color","#2C2E34");
  442. if(this.devicePc()){
  443. $(".news-body").css("padding-top","0%");
  444. }else {
  445. $(".news-body").css("padding-top","11.5%");
  446. }
  447. }
  448. }
  449. $(".news_tab_img").on("click", function (e) {
  450. lishChange();
  451. });
  452. });
  453. function startWow() {
  454. //start wow
  455. var wow = new WOW({
  456. boxClass: 'wow',
  457. animateClass: 'animated',
  458. offset: 100,
  459. mobile: true,
  460. live: true
  461. });
  462. wow.init();
  463. }
  464. /**
  465. * check safari浏览器
  466. * @returns {boolean}
  467. */
  468. function isSafari() {
  469. return !!(navigator.userAgent.match('Safari') && !navigator.userAgent.match('CriOS') && !navigator.userAgent.match('QQBrowser') && !navigator.userAgent.match('Chrome'));
  470. }
  471. /**
  472. * 获取safari环境下的时间戳
  473. * @param date 2018-12-10T02:35:08.000+0000
  474. */
  475. function getDateForSafari(date){
  476. var year = date.substr(0,4);
  477. var month = date.substr(5,2);
  478. var day = date.substr(8,2);
  479. console.log("year:"+year);
  480. console.log("month:"+month);
  481. console.log("day:"+day);
  482. return year+"/"+month+"/"+day;
  483. }
  484. function menuShowProjects() {
  485. top.closeAndShowPro('projectsLayer');
  486. }
  487. function turnToArticle(data) {
  488. item = window.newsList[data];
  489. lineUrl = item["linkPcUrl"];
  490. if(!this.devicePc()){
  491. lineUrl = item["linkUrl"];
  492. }
  493. var parentDiv = document.getElementById("iframeParent");
  494. articleCloseBtn = document.createElement("Div");
  495. articleCloseBtn.setAttribute('class',"article-close");
  496. articleCloseBtn.setAttribute('id','articleCloseBtn');
  497. parentDiv.appendChild(articleCloseBtn);
  498. iframeHtml = document.createElement("iframe");
  499. iframeHtml.setAttribute('frameborder','0');
  500. iframeHtml.setAttribute('height','100vh');
  501. iframeHtml.setAttribute('width','100%');
  502. iframeHtml.setAttribute('scrolling','yes');
  503. iframeHtml.setAttribute('name','newsIframe');
  504. iframeHtml.setAttribute('class',"iframe-news");
  505. iframeHtml.setAttribute('id',"iframe-news");
  506. iframeHtml.onload = function(){
  507. // reinitIframe();
  508. };
  509. parentDiv.appendChild(iframeHtml);
  510. iframeHtml.setAttribute('src',lineUrl);
  511. $(".top-menu-news").css("background-color","#FFFFFF");
  512. if(!lineUrl){
  513. return
  514. }
  515. // frame.src = lineUrl;
  516. $('.news-iframe').attr('src', $('.news-iframe').attr('src'));
  517. $(".inner-main").attr("src", "http://yun-image.elab-plus.com/images/index/1_objects@2x_2.png");
  518. $(".inner-menu").attr("src", "http://yun-image.elab-plus.com/images/index/1_objects@2x_3.png");
  519. $(".inner-artcle").attr("src", "http://yun-image.elab-plus.com/images/index/1_objects@2x_4.png");
  520. $(".news-detail").addClass("active");
  521. iframeShow = true;
  522. // news-detail
  523. // news-body
  524. }
  525. function reinitIframe() {
  526. // var iframe = document.getElementById("iframe-news");
  527. var iframe = $("#iframe-news");
  528. setTimeout(function () {
  529. var height = iframe.contents().find("body").height();
  530. console.log("reinitIframe:"+height);
  531. },500);
  532. }
  533. function setIframeHeight(iframeId){
  534. var iframe = document.getElementById(iframeId);
  535. console.log("setIframeHeight");
  536. if (document.getElementById){
  537. if (iframe && !window.opera){
  538. if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight){
  539. iframe.height = iframe.contentDocument.body.offsetHeight + 20; //FF NS
  540. }else if(iframe.Document && iframe.Document.body.scrollHeight){
  541. iframe.height = iframe.Document.body.scrollHeight + 10;
  542. }else{
  543. if(iframe.contentWindow.document && iframe.contentWindow.document.body.scrollHeight) {
  544. iframe.height = iframe.contentWindow.document.body.scrollHeight;
  545. }
  546. }
  547. }
  548. }
  549. }
  550. function devicePc() {
  551. var sUserAgent = navigator.userAgent.toLowerCase();
  552. var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
  553. var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
  554. var bIsMidp = sUserAgent.match(/midp/i) == "midp";
  555. var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
  556. var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
  557. var bIsAndroid = sUserAgent.match(/android/i) == "android";
  558. var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
  559. var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
  560. if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
  561. return false;
  562. } else {
  563. return true;
  564. }
  565. }
  566. </script>
  567. </body>
  568. </html>