Authored by 毕凯

增加不使用优惠券功能

@@ -55,6 +55,12 @@ $('#coupon-list').on('touchend', '.employ-main', function() { @@ -55,6 +55,12 @@ $('#coupon-list').on('touchend', '.employ-main', function() {
55 orderInfo('couponValue', $this.data('coupon-value')); 55 orderInfo('couponValue', $this.data('coupon-value'));
56 }); 56 });
57 57
  58 +$('body').on('touchend', '.not-use', function() {
  59 + orderInfo('couponCode', null);
  60 + orderInfo('couponValue', null);
  61 +});
  62 +
  63 +
58 $newCoupon.find('input').on('input', function() { 64 $newCoupon.find('input').on('input', function() {
59 if ($(this).val() !== '') { 65 if ($(this).val() !== '') {
60 $newCoupon.find('.submit').css('background', '#444'); 66 $newCoupon.find('.submit').css('background', '#444');
@@ -46,6 +46,17 @@ @@ -46,6 +46,17 @@
46 height: 0; 46 height: 0;
47 } 47 }
48 48
  49 + .not-use {
  50 + display: block;
  51 + width: pxToRem(560px);
  52 + margin: pxToRem(30px) auto;
  53 + text-align: center;
  54 + font-size: pxToRem(32px);
  55 + line-height: 2.5;
  56 + border: 1px solid #444;
  57 + @include border-radius(4px);
  58 + }
  59 +
49 .not-avaliable-coupon-line { 60 .not-avaliable-coupon-line {
50 position: relative; 61 position: relative;
51 margin-top: pxToRem(30px); 62 margin-top: pxToRem(30px);
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 </a> 20 </a>
21 \{{/ notAvailable}} 21 \{{/ notAvailable}}
22 \{{/coupons}} 22 \{{/coupons}}
  23 +<a class="not-use" href="/cart/index/orderEnsure">不使用任何优惠券</a>
23 </script> 24 </script>
24 <script id="tmpl-coupon-not-avaliable" type="text/tmpl"> 25 <script id="tmpl-coupon-not-avaliable" type="text/tmpl">
25 \{{# notAvailableCoupons}} 26 \{{# notAvailableCoupons}}