spike_ajax_wait_fetch.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?php
  2. if(!empty($list)) {
  3. ?>
  4. <volist name="list" id="d">
  5. <div class="spike-list-item-0" onclick="location.href='{:U('/goods/'.$d['goods_id'])}'">
  6. <div avalonctrl="spike-list-item-0">
  7. <?php
  8. $to_night = strtotime(date('Y-m-d')." 23:59:59");
  9. $tomo_night = $to_night + 86400;
  10. $aftmo_night = $to_night + 86400*2;
  11. ?>
  12. <?php if(empty($cur_btime) ){
  13. $cur_btime = $d['begin_time'];//首次进入
  14. ?>
  15. <?php if($d['begin_time'] <= time() && $d['end_time'] > time() ){
  16. $is_first = true;
  17. ?>
  18. <!-- 正在进行中,并且首次进入 -->
  19. <div class="time-line" style="display:none;">
  20. <!--ms-if-->
  21. <span class="icon"><div class="time-icon time-icon-current"></div><span>
  22. <span class="time-show time-show-current"> <?php echo date('H').':00'; ?> 正在进行中</span>
  23. </span></span>
  24. </div>
  25. <?php } else if($d['begin_time'] < $to_night){ ?>
  26. <div class="time-line" style="display:none;">
  27. <!--ms-if-->
  28. <span class="icon"><div class="time-icon"></div><span>
  29. <span class="time-show"> <?php echo date('H',$d['begin_time']).':00'; ?> </span>
  30. </span></span>
  31. </div>
  32. <?php }else if($d['begin_time'] > $to_night && $d['begin_time'] < $tomo_night){ ?>
  33. <!-- 明日 -->
  34. <div class="time-line" style="display:none;">
  35. <!--ms-if-->
  36. <span class="icon"><div class="time-icon"></div><span>
  37. <span class="time-show">明日 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
  38. </span></span>
  39. </div>
  40. <?php }else if($d['begin_time'] > $tomo_night && $d['begin_time'] < $aftmo_night){ ?>
  41. <!-- 后日 -->
  42. <div class="time-line" style="display:none;">
  43. <!--ms-if-->
  44. <span class="icon"><div class="time-icon"></div><span>
  45. <span class="time-show">后天 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
  46. </span></span>
  47. </div>
  48. <?php }else{ $is_first = false; ?>
  49. <!-- 很多天以后 -->
  50. <div class="time-line" style="display:none;">
  51. <!--ms-if-->
  52. <span class="icon"><div class="time-icon"></div><span>
  53. <span class="time-show"> <?php echo date('Y-m-d H',$d['begin_time']).':00'; ?> </span>
  54. </span></span>
  55. </div>
  56. <?php } ?>
  57. <?php }else if($d['begin_time'] != $cur_btime){
  58. $cur_btime = $d['begin_time'];
  59. $is_first = false;
  60. ?>
  61. <?php if($d['begin_time'] < $to_night){ ?>
  62. <div class="time-line" style="display:none;">
  63. <!--ms-if-->
  64. <span class="icon"><div class="time-icon"></div><span>
  65. <span class="time-show"> <?php echo date('H',$d['begin_time']).':00'; ?> </span>
  66. </span></span>
  67. </div>
  68. <?php }else if($d['begin_time'] > $to_night && $d['begin_time'] < $tomo_night){ ?>
  69. <!-- 明日 -->
  70. <div class="time-line" style="display:none;">
  71. <!--ms-if-->
  72. <span class="icon"><div class="time-icon"></div><span>
  73. <span class="time-show">明日 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
  74. </span></span>
  75. </div>
  76. <?php }else if($d['begin_time'] > $tomo_night && $d['begin_time'] < $aftmo_night){ ?>
  77. <!-- 后日 -->
  78. <div class="time-line" style="display:none;">
  79. <!--ms-if-->
  80. <span class="icon"><div class="time-icon"></div><span>
  81. <span class="time-show">后天 <?php echo date('H',$d['begin_time']).':00'; ?> </span>
  82. </span></span>
  83. </div>
  84. <?php }else{ ?>
  85. <!-- 很多天以后 -->
  86. <div class="time-line" style="display:none;">
  87. <!--ms-if-->
  88. <span class="icon"><div class="time-icon"></div><span>
  89. <span class="time-show"> <?php echo date('Y-m-d H',$d['begin_time']).':00'; ?> </span>
  90. </span></span>
  91. </div>
  92. <?php } ?>
  93. <?php }else {
  94. $cur_btime = $d['begin_time'];
  95. $is_first = false;
  96. ?>
  97. <?php } ?>
  98. <div class="spike-goods">
  99. <?php if($is_first){ ?>
  100. <div class="line line-current" style="display:none;"></div>
  101. <?php }else { ?>
  102. <div class="line " style="display:none;"></div>
  103. <?php } ?>
  104. <img class="spike-img scrollLoading" src="{$fan_ly_image}" data-echo="{$d.image}">
  105. <div class="spike-info">
  106. <div class="spike-goods-name">{$d.name}</div>
  107. <div class="spike-buy">
  108. <div class="all-price">
  109. <span class="sale-symbol">¥</span>
  110. <span class="sale-price">{$d.pinprice}</span>
  111. <span class="market-price">¥<span class="market">{$d.price}<span></span>
  112. </span></span></div>
  113. <?php if($d['quantity'] != 0 && $d['begin_time'] <= time() && $d['end_time'] > time()){ ?>
  114. <div class="left-time spike-button-on">
  115. <div class="quantity">
  116. <span class="head">剩余</span>
  117. <div class="quantity-detail">
  118. <span>{$d.quantity}件</span>
  119. </div>
  120. </div>
  121. <span class="btnClass">马上抢</span>
  122. </div>
  123. <?php } ?>
  124. <?php if($d['quantity'] == 0){ ?>
  125. <div class="left-time spike-button-off">
  126. <div class="quantity">
  127. <span class="head">剩余</span>
  128. <div class="quantity-detail">
  129. <span>{$d.quantity}件</span>
  130. </div>
  131. </div>
  132. <span class="btnClass">已售罄</span>
  133. </div>
  134. <?php } ?>
  135. <?php if($d['end_time'] < time() ){ ?>
  136. <div class="left-time spike-button-off">
  137. <div class="quantity">
  138. <span class="head">剩余</span>
  139. <div class="quantity-detail">
  140. <span>{$d.quantity}件</span>
  141. </div>
  142. </div>
  143. <span class="btnClass">已结束</span>
  144. </div>
  145. <?php } ?>
  146. <?php if($d['quantity'] != 0 && $d['begin_time'] > time()) { ?>
  147. <div class="left-time spike-button-coming">
  148. <div class="quantity">
  149. <span class="head">限量</span>
  150. <div class="quantity-detail">
  151. <span>{$d.quantity}件</span>
  152. </div>
  153. </div>
  154. <span class="btnClass">即将开抢</span>
  155. </div>
  156. <?php } ?>
  157. </div>
  158. </div>
  159. </div>
  160. <!--ms-if-->
  161. <?php if($is_first){ ?>
  162. <div class="view-more" id="more">
  163. <span>查看之前时间段已售罄商品</span>
  164. </div>
  165. <?php } ?>
  166. <div class="final-icon" style="display:none;"></div>
  167. <!--ms-if-->
  168. </div>
  169. </div>
  170. <?php $last_btime = $d['begin_time']; ?>
  171. </volist>
  172. <?php } ?>