...
|
...
|
@@ -315,7 +315,6 @@ $.ajax({ |
|
|
channel: 1,
|
|
|
},
|
|
|
success: function(data) {
|
|
|
console.log(data);
|
|
|
var vip = $('.vip-only');
|
|
|
if (data.code === 200 && Number(data.current_vip_level) !== 0) {
|
|
|
vip.show();
|
...
|
...
|
@@ -327,4 +326,28 @@ $.ajax({ |
|
|
searching = false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// sale倒计时
|
|
|
var saleTime = function(elem, offsetTime) {
|
|
|
var hour = parseInt(offsetTime % (60 * 60 * 24) / (60 * 60), 10),
|
|
|
minute = parseInt(offsetTime % (60 * 60) / 60, 10),
|
|
|
second = offsetTime % 60;
|
|
|
|
|
|
if (offsetTime >= -1) {
|
|
|
$(elem).find('.hour').text(hour < 0 ? '00' : (hour < 10 ? ('0' + hour) : hour));
|
|
|
$(elem).find('.minute').text(minute < 0 ? '00' : (minute < 10 ? ('0' + minute) : minute));
|
|
|
$(elem).find('.second').text(second < 0 ? '00' : (second < 10 ? ('0' + second) : second));
|
|
|
|
|
|
if (offsetTime <= -1) { // 结束倒计时刷新状态
|
|
|
console.log('time done!');
|
|
|
} else {
|
|
|
setTimeout(function() {
|
|
|
saleTime(elem, --offsetTime);
|
|
|
}, 1000);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
saleTime('.sale-floor-time', 10);
|
|
|
|
|
|
require('./maybe-like')(); |
|
|
\ No newline at end of file |
...
|
...
|
|