index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 $focusData}>
  10. <!--焦点图-->
  11. <section class="slider">
  12. <section class="swiper-container">
  13. <div class="swiper-wrapper">
  14. <{foreach from=$focusData item=v}>
  15. <div class="swiper-slide">
  16. <a href="<{$v.url}>"><img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="<{$v.img_url}>"></a>
  17. </div>
  18. <{/foreach}>
  19. </div>
  20. </section>
  21. <div class="swiper-pagination"></div>
  22. </section>
  23. <{/if}>
  24. <{if $categoryData}>
  25. <!--分类-->
  26. <section class="avatarlist">
  27. <ul>
  28. <{foreach from=$categoryData item=v}>
  29. <li><a href="<{$domain}>/cate/<{$v.id}>/<{$url}>"><img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="<{$v.icon}>"><span><{$v.name}></span></a></li>
  30. <{/foreach}>
  31. </ul>
  32. </section>
  33. <{/if}>
  34. <{if $userEventsData}>
  35. <section class="userlist">
  36. <h2>获得福利</h2>
  37. <ul>
  38. <{foreach from=$userEventsData item=v}>
  39. <li><img src="<{$v.user.headimgurl}>"><span>用户 <{$v.user.mobile}> 在 <{$v.user.cdate}> 获得 <{$v.user.events}> <{$v.user.ext}>。</span></li>
  40. <{/foreach}>
  41. </ul>
  42. </section>
  43. <{/if}>
  44. <{if $eventsData}>
  45. <section class="cardlist">
  46. <h2>热门活动</h2>
  47. <{foreach from=$eventsData item=events}>
  48. <dl class="noborder">
  49. <dt><a href="<{$events.url}>"><img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="<{$events.img_url}>"></a></dt>
  50. <dd><h5><{$events.events_name}></h5></dd>
  51. <dd>
  52. <{if $events.rday>=1}>
  53. <span class="time">
  54. <em class="icon-time"></em>剩余<{$events.rday}>天</span>
  55. <{elseif $events.type != 9}>
  56. <span class="time">
  57. <em class="icon-time"></em>已结束</span>
  58. <{/if}>
  59. <{if $events.type == 9}>
  60. <span>阅读 <{$events.click_num}></span>
  61. <span>点赞 <{$events.likes}></span>
  62. <{else}>
  63. <span>参与<{$events.user_total}>人</span>
  64. <{/if}>
  65. </dd>
  66. </dl>
  67. <{/foreach}>
  68. </section>
  69. <{/if}>
  70. <script>
  71. KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
  72. var $ = S.all;
  73. var lock = false;
  74. new Datalazyload({
  75. load: function(el){
  76. if (lock) return false;
  77. lock = true;
  78. var requesrUrl = $(el).attr('data-request-url');
  79. var page = Number($(el).attr('data-page'));
  80. var totals = Number($(el).attr('data-totals'));
  81. if (!requesrUrl) {
  82. lock = false;
  83. return false;
  84. }
  85. if (page > totals) {
  86. $('.loading').hide();
  87. return false;
  88. }
  89. IO.get(
  90. requesrUrl
  91. , {page: page}
  92. , function (data) {
  93. if (data.ok) {
  94. var next_page = page + 1;
  95. $('#loadPage').attr('data-page', next_page);
  96. var new_dl = $(data.msg);
  97. $(".vogue_top_list").append(new_dl);
  98. new Datalazyload();
  99. lock = false;
  100. if (next_page > totals) {
  101. $('.loading').hide();
  102. }
  103. }
  104. }
  105. , 'json'
  106. );
  107. }
  108. });
  109. });
  110. //判断当前页图片加载完成loading消失
  111. /* $(".vogue_top_list").find("img").load(function(){
  112. $(this).parent().css("background","none");
  113. }); */
  114. </script>
  115. <{include file="bottom.html"}>
  116. <script type="text/javascript" src="<{$web_cfg.cdn}>/haili/js/index.js"></script>