Authored by 毕凯

整合 优惠券

... ... @@ -24,7 +24,7 @@ ellipsis.init();
$newCoupon.on('submit', function() {
$.ajax({
method: 'POST',
url: '/shoppingCart/coupon',
url: '/shoppingCart/couponSearch',
data: $(this).serialize()
}).then(function(res) {
if (res.code === 200) {
... ... @@ -40,7 +40,7 @@ $newCoupon.on('submit', function() {
return false;
});
$('#coupon-list').on('touchend', 'employ-main', function() {
$('#coupon-list').on('touchend', '.employ-main', function() {
orderInfo('couponCode', $(this).data('coupon-code'));
});
... ... @@ -126,7 +126,7 @@ function getCouponDate() {
$.ajax({
type: 'POST',
url: '/home/couponData',
url: '/shoppingCart/couponList',
dataType: 'json',
data: {
page: page
... ...
... ... @@ -2,7 +2,7 @@
<div class="my-address-page select-address-page yoho-page">
<div class="page-wrap">
{{# address}}
<a class="address-item" data-address-id="{{address_id}}" href="/shoppingCart/orderEnsure?address_id={{address_id}}">
<a class="address-item" data-address-id="{{address_id}}" href="/shoppingCart/orderEnsure">
<span class="name">{{consignee}}</span>
<span class="tel">{{mobile}}</span>
<p class="address-info">{{area}} {{address}}</p>
... ...
... ... @@ -11,9 +11,9 @@
<script id="tmpl-coupon" type="text/tmpl">
\{{#coupons}}
\{{^ notAvailable}}
<a class="employ-main" data-coupon-code="{{ coupon_code}}" href="/shoppingCart/orderEnsure?coupon_code={{ coupon_code}}">
<span>\{{ money}}</span>
<p class="coupon-name">\{{ coupon_name}}</p>
<a class="employ-main" data-coupon-code="\{{ couponCode}}" href="/shoppingCart/orderEnsure">
<span>\{{ couponValue}}</span>
<p class="coupon-name">\{{ couponDetailInfomation}}</p>
<p>有效期:\{{ couponValidity}}</p>
</a>
\{{/ notAvailable}}
... ... @@ -22,8 +22,8 @@
<script id="tmpl-coupon-not-avaliable" type="text/tmpl">
\{{# notAvailableCoupons}}
<div class="employ-main not-avaliable">
<span>\{{ money}}</span>
<p class="coupon-name">\{{ coupon_name}}</p>
<span>\{{ couponValue}}</span>
<p class="coupon-name">\{{ couponDetailInfomation}}</p>
<p>有效期:\{{ couponValidity}}</p>
</div>
\{{/ notAvailableCoupons}}
... ...
... ... @@ -491,7 +491,7 @@ class CartModel
$val['notAvailable'] = true;
}
}
!empty($couponArr) && $result['coupons'] = $couponArr;
!empty($couponArr) && $result = $couponArr;
}
}
... ...