Authored by zzzzzzz

sale倒计时bug

@@ -8,9 +8,11 @@ @@ -8,9 +8,11 @@
8 <img src="{{image src 269 360}}" alt="sale-limit" class="sale-floor-limit"> 8 <img src="{{image src 269 360}}" alt="sale-limit" class="sale-floor-limit">
9 <div class="sale-floor-time" data-time={{end_time}}> 9 <div class="sale-floor-time" data-time={{end_time}}>
10 <p class="limit-title"><i class="icon"></i>限时特卖</p> 10 <p class="limit-title"><i class="icon"></i>限时特卖</p>
11 - <span class="hour">00</span>:  
12 - <span class="minute">00</span>:  
13 - <span class="second">00</span> 11 + <div class="limit">
  12 + <span class="hour">00</span>:
  13 + <span class="minute">00</span>:
  14 + <span class="second">00</span>
  15 + </div>
14 </div> 16 </div>
15 </a> 17 </a>
16 {{/list.[0]}} 18 {{/list.[0]}}
@@ -349,7 +349,7 @@ var saleTime = function(elem, offsetTime) { @@ -349,7 +349,7 @@ var saleTime = function(elem, offsetTime) {
349 $(elem).find('.second').text(second < 0 ? '00' : (second < 10 ? ('0' + second) : second)); 349 $(elem).find('.second').text(second < 0 ? '00' : (second < 10 ? ('0' + second) : second));
350 350
351 if (offsetTime <= -1) { // 结束倒计时刷新状态 351 if (offsetTime <= -1) { // 结束倒计时刷新状态
352 - console.log('time done!'); 352 + $(elem).find('.limit').hide();
353 } else { 353 } else {
354 setTimeout(function() { 354 setTimeout(function() {
355 saleTime(elem, --offsetTime); 355 saleTime(elem, --offsetTime);