...
|
...
|
@@ -67,9 +67,26 @@ $newCoupon.on('submit', function() { |
|
|
|
|
|
$('#coupon-list').on('touchend', '.employ-main', function() {
|
|
|
var $this = $(this);
|
|
|
var couponCode = $this.data('coupon-code');
|
|
|
|
|
|
orderInfo('couponCode', $this.data('coupon-code'));
|
|
|
orderInfo('couponName', $this.data('coupon-name'));
|
|
|
$.ajax({
|
|
|
method: 'POST',
|
|
|
url: '/cart/index/couponSearch',
|
|
|
data: {
|
|
|
couponCode: couponCode
|
|
|
}
|
|
|
}).then(function(res) {
|
|
|
if (res.code === 200) {
|
|
|
//tip.show('优惠券可用');
|
|
|
orderInfo('couponCode', res.data.coupon_code);
|
|
|
orderInfo('couponName', res.data.coupon_title);
|
|
|
window.location.href = '/cart/index/orderEnsure';
|
|
|
} else {
|
|
|
tip.show(res.message || '网络错误');
|
|
|
}
|
|
|
}).fail(function() {
|
|
|
tip.show('网络错误');
|
|
|
});
|
|
|
}).on('touchstart', '.employ-main', function() {
|
|
|
var $this = $(this);
|
|
|
|
...
|
...
|
|