Authored by zzzzzzz

倒计时支持多楼层

... ... @@ -361,11 +361,17 @@ var saleTime = function(elem, offsetTime) {
}
};
let endTime = $('.sale-floor-time').attr('data-time'),
var limitFloor = $('.sale-floor-time');
limitFloor.each(function() {
var endTime = $(this).attr('data-time'),
// ~~两次取反位运算就是取整
limit = ~~((endTime * 1000 - Date.now()) / 1000);
saleTime('.sale-floor-time', limit);
saleTime(this, limit);
});
require('./maybe-like')();
... ...