...
|
...
|
@@ -36,26 +36,27 @@ function downCount(options) { |
|
|
_minute = _second * 60,
|
|
|
_hour = _minute * 60,
|
|
|
_day = _hour * 24,
|
|
|
days,
|
|
|
hours,
|
|
|
minutes,
|
|
|
seconds;
|
|
|
|
|
|
// calculate dates
|
|
|
days = Math.floor(difference / _day),
|
|
|
hours = Math.floor((difference % _day) / _hour),
|
|
|
minutes = Math.floor((difference % _hour) / _minute),
|
|
|
seconds = Math.floor((difference % _minute) / _second);
|
|
|
|
|
|
// fix dates so that it will show two digets
|
|
|
days = (String(days).length >= 2) ? days : '0' + days;
|
|
|
hours = (String(hours).length >= 2) ? hours : '0' + hours;
|
|
|
minutes = (String(minutes).length >= 2) ? minutes : '0' + minutes;
|
|
|
seconds = (String(seconds).length >= 2) ? seconds : '0' + seconds;
|
|
|
|
|
|
// set to DOM
|
|
|
$countdownContainer.removeClass('hide');
|
|
|
$countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds);
|
|
|
if (hours === '00') {
|
|
|
$countDownHours.text('剩余' + minutes + ':' + seconds);
|
|
|
} else {
|
|
|
$countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds);
|
|
|
}
|
|
|
|
|
|
difference -= 1000;
|
|
|
|
...
|
...
|
@@ -121,12 +122,10 @@ if ($ownerInfo.data('changeable') === true) { |
|
|
|
|
|
$(function() {
|
|
|
reasonSwiper = new Swiper('.box-main', {
|
|
|
paginationClickable: true,
|
|
|
direction: 'vertical',
|
|
|
slidesPerView: 6,
|
|
|
height: 200,
|
|
|
initialSlide: 0,
|
|
|
centeredSlides: true,
|
|
|
initialSlide: 3,
|
|
|
slidesPerView: 5,
|
|
|
direction: 'vertical',
|
|
|
onSlideChangeStart: function(reasonSwiper) {
|
|
|
var activeIndex = reasonSwiper.activeIndex,
|
|
|
slides = reasonSwiper.slides,
|
...
|
...
|
|