...
|
...
|
@@ -16,11 +16,12 @@ var page = 1, |
|
|
isGetData;
|
|
|
|
|
|
var conponTmpl = Handlebars.compile($('#tmpl-coupon').html()),
|
|
|
conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html());
|
|
|
conponNotAvaliableTmpl = Handlebars.compile($('#tmpl-coupon-not-avaliable').html()),
|
|
|
$newCoupon = $('#new-coupon');
|
|
|
|
|
|
ellipsis.init();
|
|
|
|
|
|
$('#search-coupon').on('submit', function() {
|
|
|
$newCoupon.on('submit', function() {
|
|
|
$.ajax({
|
|
|
method: 'POST',
|
|
|
url: '/shoppingCart/coupon',
|
...
|
...
|
@@ -43,6 +44,14 @@ $('#coupon-list').on('touchend', 'employ-main', function() { |
|
|
orderInfo('couponCode', $(this).data('coupon-code'));
|
|
|
});
|
|
|
|
|
|
$newCoupon.find('input').on('input', function() {
|
|
|
if ($(this).val() !== '') {
|
|
|
$newCoupon.find('.submit').css('background', '#444');
|
|
|
} else {
|
|
|
$newCoupon.find('.submit').css('background', '#b0b0b0');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
function getCouponHandle(coupons) {
|
|
|
var notAvailableCoupons = [];
|
|
|
|
...
|
...
|
|