123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?php
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <style>
- .vogue_top_list img {
- background:
- /public/static/img/m-load.gif") no-repeat scroll 50% center / 20px 20px;
- }
- </style>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "common_header.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <div class="wrapper clear">
- <div class="vogue_top_list">
- <?php $_from = $this->_tpl_vars['eventsData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['events']):
- ?>
- <dl>
- <a href="<?php echo $this->_tpl_vars['events']['url']; ?>
- ">
- <dt><img src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/img/bg_alpha.png" data-ks-lazyload="<?php echo $this->_tpl_vars['events']['img_url']; ?>
- "></dt>
- <dd>
- <p><?php echo $this->_tpl_vars['events']['events_name']; ?>
- </p>
- <p class="v_time">
- <?php if ($this->_tpl_vars['events']['rday'] >= 1): ?>
- <em class="time_icon"></em><span>剩余<?php echo $this->_tpl_vars['events']['rday']; ?>
- 天</span>
- <?php else: ?>
- 已结束
- <?php endif; ?>
- </p>
- </dd>
- </a>
- </dl>
- <?php endforeach; endif; unset($_from); ?>
- </div>
-
- <div class="clear"></div>
- <?php if ($this->_tpl_vars['totals']): ?>
- <div class="loading">
- <img
- id="loadPage"
- data-ks-lazyload="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/img/loading_new.gif"
- data-request-url="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
- /?c=index&a=ajax&plat_form_id=<?php echo $this->_tpl_vars['plat_form_id']; ?>
- &url=<?php echo $this->_tpl_vars['url']; ?>
- "
- data-page="2"
- data-totals="<?php echo $this->_tpl_vars['totals']; ?>
- "
- style="width:0px;"
- />
- <div class="loader-inner ball-pulse">
- <div></div><div></div><div></div><div></div><div></div><div></div>
- </div>
- </div>
- <?php endif; ?>
- <br>
-
- </div>
- <!--loading 样式1-->
- <!--<div class="loading">
- <div class="loader-inner line-spin-fade-loader">
- <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
- </div>
- </div>-->
- <!--loading 样式2-->
- <!--<div class="loading">
- <div class="loader-inner ball-pulse">
- <div></div><div></div><div></div><div></div><div></div><div></div>
- </div>
- </div>-->
- <script>
- KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
- var $ = S.all;
- var lock = false;
-
- new Datalazyload({
- load: function(el){
- if (lock) return false;
- lock = true;
-
- var requesrUrl = $(el).attr('data-request-url');
- var page = Number($(el).attr('data-page'));
- var totals = Number($(el).attr('data-totals'));
- if (!requesrUrl) {
- lock = false;
- return false;
- }
-
- if (page > totals) {
- $('.loading').hide();
- return false;
- }
-
- IO.get(
- requesrUrl
- , {page: page}
- , function (data) {
- if (data.ok) {
- var next_page = page + 1;
- $('#loadPage').attr('data-page', next_page);
- var new_dl = $(data.msg);
- $(".vogue_top_list").append(new_dl);
- //new Datalazyload();
- lock = false;
-
- if (next_page > totals) {
- $('.loading').hide();
- }
- }
- }
- , 'json'
- );
- }
- });
- });
- //判断当前页图片加载完成loading消失
- /* $(".vogue_top_list").find("img").load(function(){
- $(this).parent().css("background","none");
- }); */
- </script>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "bottom.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
|