Authored by 陈峰

Merge branch 'feature/cart' of http://git.yoho.cn/fe/yohobuywap-node into feature/cart

@@ -78,11 +78,11 @@ @@ -78,11 +78,11 @@
78 <span>{{amount}}</span> 78 <span>{{amount}}</span>
79 </li> 79 </li>
80 </ul> 80 </ul>
81 - {{#if yohoGoiveCoin}} 81 + {{#if yohoGiveCoin}}
82 <p class="dollar"> 82 <p class="dollar">
83 <span class="bg-dollar"></span> 83 <span class="bg-dollar"></span>
84 共返YOHO币: 84 共返YOHO币:
85 - <span>{{yohoGoiveCoin}}</span> 85 + <span>{{yohoGiveCoin}}</span>
86 </p> 86 </p>
87 {{/if}} 87 {{/if}}
88 88
@@ -83,9 +83,10 @@ $couponList.on('touchstart', '.employ-main', function() { @@ -83,9 +83,10 @@ $couponList.on('touchstart', '.employ-main', function() {
83 $('body').on('touchend', '.not-use', function() { 83 $('body').on('touchend', '.not-use', function() {
84 orderInfo('couponCode', null); 84 orderInfo('couponCode', null);
85 orderInfo('couponName', null); 85 orderInfo('couponName', null);
86 - //实付金额发生变化,使用有货币为0 86 +
  87 + // 实付金额发生变化,使用有货币为0
87 orderInfo('yohoCoin', 0); 88 orderInfo('yohoCoin', 0);
88 - location.href = '/cart/index/orderEnsure'; 89 + location.href = '/cart/index/new/orderEnsure';
89 }); 90 });
90 91
91 92
@@ -127,9 +128,8 @@ function getCouponHandle(allCoupons) { @@ -127,9 +128,8 @@ function getCouponHandle(allCoupons) {
127 })).find('.employ-main').each(function(i, elem) { 128 })).find('.employ-main').each(function(i, elem) {
128 var employHammer = new Hammer(elem); 129 var employHammer = new Hammer(elem);
129 130
130 - employHammer.on('tap', function(e) {  
131 - var $this = $(e.srcEvent.currentTarget);  
132 - var couponCode = $this.data('coupon-code'); 131 + employHammer.on('tap', function() {
  132 + var couponCode = $(elem).data('coupon-code');
133 133
134 $.ajax({ 134 $.ajax({
135 method: 'POST', 135 method: 'POST',
@@ -140,12 +140,13 @@ function getCouponHandle(allCoupons) { @@ -140,12 +140,13 @@ function getCouponHandle(allCoupons) {
140 }).then(function(res) { 140 }).then(function(res) {
141 if (res.code === 200) { 141 if (res.code === 200) {
142 142
143 - //tip.show('优惠券可用'); 143 + // tip.show('优惠券可用');
144 orderInfo('couponCode', res.data.coupon_code); 144 orderInfo('couponCode', res.data.coupon_code);
145 orderInfo('couponName', res.data.coupon_title); 145 orderInfo('couponName', res.data.coupon_title);
146 - //实付金额发生变化,使用有货币为0 146 +
  147 + // 实付金额发生变化,使用有货币为0
147 orderInfo('yohoCoin', 0); 148 orderInfo('yohoCoin', 0);
148 - window.location.href = '/cart/index/orderEnsure'; 149 + window.location.href = '/cart/index/new/orderEnsure';
149 } else if (res.message) { 150 } else if (res.message) {
150 tip.show(res.message); 151 tip.show(res.message);
151 } 152 }