news_list.html 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" class="index_page">
  3. <head>
  4. {template header}
  5. <title>{$page_title}</title>
  6. <meta name="keywords" content="{$channel[keywords]}" />
  7. <meta name="description" id="description" content="{$channel[description]}" />
  8. <link type="text/css" rel="stylesheet" href="{$mayimobile[mobiledomain]}/template/css/global.css">
  9. <link type="text/css" rel="stylesheet" href="{$mayimobile[mobiledomain]}/template/css/style.css">
  10. <link type="text/css" rel="stylesheet" href="{$mayimobile[mobiledomain]}/template/css/news.css">
  11. <script>window['current'] = '{$cat[catname]}';</script>
  12. </head>
  13. <body class="{$mymps_global[cfg_tpl_dir]}">
  14. <div class="wrapper">
  15. {template header_search}
  16. <div class="clearfix"></div>
  17. <div class="news">
  18. <div class="select_01" id="wrapper2">
  19. <ul class="tab-hd" id="scroller2">
  20. <!--{loop $rootchannel $mymps}-->
  21. <li class="{if $mymps[catid] == $catid}current{/if} item"><a href="{$mymps[uri_m]}">最新</a></li>
  22. <!--{loop $mymps[children] $w}-->
  23. <li class="{if $w[catid] == $catid}current{/if} item"><a href="{$w[uri_m]}">{$w[catname]}</a></li>
  24. <!--{loopelse}-->
  25. <script>$("#wrapper2").hide();</script>
  26. <!--{/loop}-->
  27. <!--{/loop}-->
  28. </ul>
  29. </div>
  30. <script type="text/javascript" src="{$mayimobile[mobiledomain]}/template/js/iscroll-probe.js"></script>
  31. <script>
  32. (function($){
  33. var w_w = $(window).width();
  34. $('#scroller2').css('width',(90*$('#scroller2').find('li').length)+40+'px');
  35. window['myScroll2'] = new IScroll('#wrapper2', {
  36. scrollX: true,
  37. scrollY: false,
  38. click:true,
  39. keyBindings: true
  40. });
  41. })(jQuery);
  42. </script>
  43. <div class="clearfix"></div>
  44. <div class="mod_02" id="myPicsrc">
  45. <div class="bd tab-cont">
  46. <ul class="list_normal list_news" id="homelist">
  47. <!--{loop $news $mymps}-->
  48. <li class="img">
  49. <a href="{$mymps[uri_m]}" class="link">
  50. <p class="img"><img src="{$mymps[imgpath]}" onerror="this.src='{$mayimobile[mobiledomain]}/template/images/noimg.gif'" /></p>
  51. <p class="tit"{if $mymps[iscommend] ==2}style="color:red"{/if}>{$mymps[title]}</p>
  52. <p class="txt">{echo cutstr($mymps[content],60,'...')}</p>
  53. <p class="hot po_ab">{echo GetTime($mymps[begintime],'m-d')}</p>
  54. </a>
  55. </li>
  56. <!--{/loop}-->
  57. </ul>
  58. <div id="loadmore"></div>
  59. </div>
  60. <div id="nodata">已加载全部数据。</div>
  61. </div>
  62. </div>
  63. </div>
  64. {template footer}
  65. <script src="{$mayimobile[mobiledomain]}/template/js/jquery.cookie.js"></script>
  66. <script src="{$mayimobile[mobiledomain]}/template/js/jquery.isload.js"></script>
  67. <script type="text/javascript">
  68. function getJson(page){isload=true;$.getJSON("{$mayimobile[mobiledomain]}/index.php",{page:i,mod:"news",catid:"{$catid}",mayi:1},function(json){if(json){var str="";$.each(json,function(index,array){var str='<li class="img">';str+='<a href="'+array["uri_m"]+'" class="link">';str+='<p class=img><img src="'+array["imgpath"]+'" onerror="this.src=\''+mobiledomain+"/template/images/noimg.gif'\" /></p>";if(array["iscommend"]==2){str+='<p class="tit" style="color:red">'+array["titlej"]+"</p>"}else{str+='<p class="tit">'+array["titlej"]+"</p>"}str+='<p class="txt">'+array["contentj"]+"</p>";str+='<p class="hot po_ab">'+array["begintimej"]+"</p>";str+="</a>";str+="</li>";$("#homelist").append(str);setCookie(1,"ProjectListPageIndex",i);ProjectListAjaxData=ProjectListAjaxData+str;sessionStorage.setItem("ProjectListAjaxData",ProjectListAjaxData)})}else{$("#loadmore").hide();showEmpty()}isload=false});i++};
  69. </script>
  70. </body>
  71. </html>