123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <?php
- if(!empty($list)) {
- ?>
- <volist name="list" id="d">
-
- <div class="spike-list-item-0" onclick="location.href='{:U('/goods/'.$d['goods_id'])}'">
- <div avalonctrl="spike-list-item-0">
- <?php
- $to_night = strtotime(date('Y-m-d')." 23:59:59");
- $tomo_night = $to_night + 86400;
- $aftmo_night = $to_night + 86400*2;
-
- ?>
- <?php if(empty($cur_btime) ){
- $cur_btime = $d['begin_time'];//首次进入
-
- ?>
- <?php if($d['begin_time'] <= time() && $d['end_time'] > time() ){
-
- $is_first = true;
- ?>
- <!-- 正在进行中,并且首次进入 -->
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon time-icon-current"></div><span>
- <span class="time-show time-show-current"> <?php echo date('H').':00'; ?> 正在进行中</span>
- </span></span>
- </div>
- <?php } else if($d['begin_time'] < $to_night){ ?>
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show"> <?php echo date('H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php }else if($d['begin_time'] > $to_night && $d['begin_time'] < $tomo_night){ ?>
- <!-- 明日 -->
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show">明日 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php }else if($d['begin_time'] > $tomo_night && $d['begin_time'] < $aftmo_night){ ?>
- <!-- 后日 -->
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show">后天 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php }else{ $is_first = false; ?>
- <!-- 很多天以后 -->
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show"> <?php echo date('Y-m-d H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php } ?>
- <?php }else if($d['begin_time'] != $cur_btime){
- $cur_btime = $d['begin_time'];
- $is_first = false;
- ?>
- <?php if($d['begin_time'] < $to_night){ ?>
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show"> <?php echo date('H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php }else if($d['begin_time'] > $to_night && $d['begin_time'] < $tomo_night){ ?>
- <!-- 明日 -->
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show">明日 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php }else if($d['begin_time'] > $tomo_night && $d['begin_time'] < $aftmo_night){ ?>
- <!-- 后日 -->
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show">后天 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php }else{ ?>
- <!-- 很多天以后 -->
- <div class="time-line" style="display:none;">
- <!--ms-if-->
- <span class="icon"><div class="time-icon"></div><span>
- <span class="time-show"> <?php echo date('Y-m-d H',$d['begin_time']).':00'; ?> </span>
- </span></span>
- </div>
- <?php } ?>
- <?php }else {
- $cur_btime = $d['begin_time'];
- $is_first = false;
- ?>
- <?php } ?>
- <div class="spike-goods">
- <?php if($is_first){ ?>
- <div class="line line-current" style="display:none;"></div>
- <?php }else { ?>
- <div class="line " style="display:none;"></div>
- <?php } ?>
- <img class="spike-img scrollLoading" src="{$fan_ly_image}" data-echo="{$d.image}">
- <div class="spike-info">
- <div class="spike-goods-name">{$d.name}</div>
- <div class="spike-buy">
- <div class="all-price">
- <span class="sale-symbol">¥</span>
- <span class="sale-price">{$d.pinprice}</span>
- <span class="market-price">¥<span class="market">{$d.price}<span></span>
- </span></span></div>
- <?php if($d['quantity'] != 0 && $d['begin_time'] <= time() && $d['end_time'] > time()){ ?>
- <div class="left-time spike-button-on">
- <div class="quantity">
- <span class="head">剩余</span>
- <div class="quantity-detail">
- <span>{$d.quantity}件</span>
- </div>
- </div>
- <span class="btnClass">马上抢</span>
- </div>
- <?php } ?>
- <?php if($d['quantity'] == 0){ ?>
- <div class="left-time spike-button-off">
- <div class="quantity">
- <span class="head">剩余</span>
- <div class="quantity-detail">
- <span>{$d.quantity}件</span>
- </div>
- </div>
- <span class="btnClass">已售罄</span>
- </div>
- <?php } ?>
- <?php if($d['end_time'] < time() ){ ?>
- <div class="left-time spike-button-off">
- <div class="quantity">
- <span class="head">剩余</span>
- <div class="quantity-detail">
- <span>{$d.quantity}件</span>
- </div>
- </div>
- <span class="btnClass">已结束</span>
- </div>
- <?php } ?>
- <?php if($d['quantity'] != 0 && $d['begin_time'] > time()) { ?>
- <div class="left-time spike-button-coming">
- <div class="quantity">
- <span class="head">限量</span>
- <div class="quantity-detail">
- <span>{$d.quantity}件</span>
- </div>
- </div>
- <span class="btnClass">即将开抢</span>
- </div>
- <?php } ?>
- </div>
- </div>
- </div>
-
- <!--ms-if-->
- <?php if($is_first){ ?>
- <div class="view-more" id="more">
- <span>查看之前时间段已售罄商品</span>
- </div>
- <?php } ?>
- <div class="final-icon" style="display:none;"></div>
- <!--ms-if-->
- </div>
- </div>
- <?php $last_btime = $d['begin_time']; ?>
- </volist>
- <?php } ?>
|