|
@@ -20,6 +20,21 @@ var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()), |
|
@@ -20,6 +20,21 @@ var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()), |
20
|
|
20
|
|
21
|
// conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html()),
|
21
|
// conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html()),
|
22
|
|
22
|
|
|
|
23
|
+function fixedLayOut() {
|
|
|
24
|
+ var $null = $('.null');
|
|
|
25
|
+
|
|
|
26
|
+ var winH = $(window).height(),
|
|
|
27
|
+ nullH = $null.height();
|
|
|
28
|
+
|
|
|
29
|
+ if ($null.length === 0) {
|
|
|
30
|
+ return false;
|
|
|
31
|
+ }
|
|
|
32
|
+
|
|
|
33
|
+ $null.css({
|
|
|
34
|
+ top: winH/2 - nullH/2
|
|
|
35
|
+ });
|
|
|
36
|
+}
|
|
|
37
|
+
|
23
|
ellipsis.init();
|
38
|
ellipsis.init();
|
24
|
|
39
|
|
25
|
$newCoupon.on('submit', function() {
|
40
|
$newCoupon.on('submit', function() {
|
|
@@ -106,6 +121,7 @@ function getCouponHandle(coupons) { |
|
@@ -106,6 +121,7 @@ function getCouponHandle(coupons) { |
106
|
// 第一页张数为 0 ,显示优惠券为空
|
121
|
// 第一页张数为 0 ,显示优惠券为空
|
107
|
if (!coupons.length && page === 2) {
|
122
|
if (!coupons.length && page === 2) {
|
108
|
$('.coupin-wrap').html($('#tmpl-no-coupon').html());
|
123
|
$('.coupin-wrap').html($('#tmpl-no-coupon').html());
|
|
|
124
|
+ fixedLayOut();
|
109
|
return;
|
125
|
return;
|
110
|
}
|
126
|
}
|
111
|
|
127
|
|
|
@@ -127,7 +143,9 @@ function getCouponHandle(coupons) { |
|
@@ -127,7 +143,9 @@ function getCouponHandle(coupons) { |
127
|
// $('#coupon-list-not').append(conponNotAvaliableTmpl({
|
143
|
// $('#coupon-list-not').append(conponNotAvaliableTmpl({
|
128
|
// notAvailableCoupons: notAvailableCoupons
|
144
|
// notAvailableCoupons: notAvailableCoupons
|
129
|
// }));
|
145
|
// }));
|
|
|
146
|
+
|
130
|
window.rePosFooter();
|
147
|
window.rePosFooter();
|
|
|
148
|
+
|
131
|
}
|
149
|
}
|
132
|
|
150
|
|
133
|
function getCouponDate() {
|
151
|
function getCouponDate() {
|
|
@@ -159,6 +177,7 @@ function getCouponDate() { |
|
@@ -159,6 +177,7 @@ function getCouponDate() { |
159
|
});
|
177
|
});
|
160
|
}
|
178
|
}
|
161
|
|
179
|
|
|
|
180
|
+
|
162
|
getCouponDate();
|
181
|
getCouponDate();
|
163
|
|
182
|
|
164
|
$(window).scroll(function() {
|
183
|
$(window).scroll(function() {
|