list.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <{include file="header.html"}>
  2. <link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/haili/css/index.css" />
  3. <style>
  4. .vogue_top_list img {
  5. background: #fff url("<{$web_cfg.cdn}>/public/static/img/m-load.gif") no-repeat scroll 50% center / 20px 20px;
  6. }
  7. </style>
  8. <{include file="common_header.html"}>
  9. <{if $eventsData}>
  10. <section class="cardlist first-module">
  11. <{foreach from=$eventsData item=events}>
  12. <dl class="noborder">
  13. <dt><a href="<{$events.url}>"><img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="<{$events.img_url}>"></a></dt>
  14. <dd><h5><{$events.events_name}></h5></dd>
  15. <dd>
  16. <{if $events.rday>=1}>
  17. <span class="time">
  18. <em class="icon-time"></em>剩余<{$events.rday}>天</span>
  19. <{elseif $events.type != 9}>
  20. <span class="time">
  21. <em class="icon-time"></em>已结束</span>
  22. <{/if}>
  23. <{if $events.type == 9}>
  24. <span>阅读 <{$events.click_num}></span>
  25. <span>点赞 <{$events.likes}></span>
  26. <{else}>
  27. <span>参与<{$events.user_total}>人</span>
  28. <{/if}>
  29. </dd>
  30. </dl>
  31. <{/foreach}>
  32. </section>
  33. <{/if}>
  34. <div class="clear"></div>
  35. <{if $totals}>
  36. <div class="loading">
  37. <img
  38. id="loadPage"
  39. data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading_new.gif"
  40. data-request-url="<{$web_cfg.domain}>/?c=cate&a=ajax&cate=<{$cate}>&plat_form_id=<{$plat_form_id}>&url=<{$url}>"
  41. data-page="2"
  42. data-totals="<{$totals}>"
  43. style="width:0px;"
  44. />
  45. <div class="loader-inner ball-pulse">
  46. <div></div><div></div><div></div><div></div><div></div><div></div>
  47. </div>
  48. </div>
  49. <{/if}>
  50. <script>
  51. KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
  52. var $ = S.all;
  53. var lock = false;
  54. new Datalazyload({
  55. load: function(el){
  56. if (lock) return false;
  57. lock = true;
  58. var requesrUrl = $(el).attr('data-request-url');
  59. var page = Number($(el).attr('data-page'));
  60. var totals = Number($(el).attr('data-totals'));
  61. if (!requesrUrl) {
  62. lock = false;
  63. return false;
  64. }
  65. if (page > totals) {
  66. $('.loading').hide();
  67. return false;
  68. }
  69. IO.get(
  70. requesrUrl
  71. , {page: page}
  72. , function (data) {
  73. if (data.ok) {
  74. var next_page = page + 1;
  75. $('#loadPage').attr('data-page', next_page);
  76. var new_dl = $(data.msg);
  77. $(".cardlist").append(new_dl);
  78. new Datalazyload();
  79. lock = false;
  80. if (next_page > totals) {
  81. $('.loading').hide();
  82. }
  83. }
  84. }
  85. , 'json'
  86. );
  87. }
  88. });
  89. });
  90. //判断当前页图片加载完成loading消失
  91. /* $(".vogue_top_list").find("img").load(function(){
  92. $(this).parent().css("background","none");
  93. }); */
  94. </script>
  95. <{include file="bottom.html"}>
  96. <script type="text/javascript" src="<{$web_cfg.cdn}>/haili/js/list.js"></script>