...
|
...
|
@@ -20,6 +20,21 @@ var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()), |
|
|
|
|
|
// conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html()),
|
|
|
|
|
|
function fixedLayOut() {
|
|
|
var $null = $('.null');
|
|
|
|
|
|
var winH = $(window).height(),
|
|
|
nullH = $null.height();
|
|
|
|
|
|
if ($null.length === 0) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
$null.css({
|
|
|
top: winH/2 - nullH/2
|
|
|
});
|
|
|
}
|
|
|
|
|
|
ellipsis.init();
|
|
|
|
|
|
$newCoupon.on('submit', function() {
|
...
|
...
|
@@ -106,6 +121,7 @@ function getCouponHandle(coupons) { |
|
|
// 第一页张数为 0 ,显示优惠券为空
|
|
|
if (!coupons.length && page === 2) {
|
|
|
$('.coupin-wrap').html($('#tmpl-no-coupon').html());
|
|
|
fixedLayOut();
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -127,7 +143,9 @@ function getCouponHandle(coupons) { |
|
|
// $('#coupon-list-not').append(conponNotAvaliableTmpl({
|
|
|
// notAvailableCoupons: notAvailableCoupons
|
|
|
// }));
|
|
|
|
|
|
window.rePosFooter();
|
|
|
|
|
|
}
|
|
|
|
|
|
function getCouponDate() {
|
...
|
...
|
@@ -159,6 +177,7 @@ function getCouponDate() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
getCouponDate();
|
|
|
|
|
|
$(window).scroll(function() {
|
...
|
...
|
|