Authored by hf

Merge remote-tracking branch 'origin/hotfix/yohocoinuse' into stable

@@ -40,7 +40,15 @@ if ($couponUse.data('name') !== orderInfo('couponName')) { @@ -40,7 +40,15 @@ if ($couponUse.data('name') !== orderInfo('couponName')) {
40 orderInfo('couponName', null); 40 orderInfo('couponName', null);
41 } 41 }
42 42
43 -orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary'); 43 +// 来自购物车的链接默认不使用优惠券
  44 +if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) {
  45 + orderInfo('couponCode', null);
  46 + orderInfo('couponName', null);
  47 +}
  48 +
  49 +if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) {
  50 + orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary');
  51 +}
44 52
45 function dispacthTapEvt(e) { 53 function dispacthTapEvt(e) {
46 var $cur = $(e.target).closest('li'); 54 var $cur = $(e.target).closest('li');
@@ -234,10 +242,10 @@ $('.coin').on('touchend', function() { @@ -234,10 +242,10 @@ $('.coin').on('touchend', function() {
234 orderCompute(); 242 orderCompute();
235 }); 243 });
236 244
237 -$invoice.on('touchend', function(e) { 245 +$invoice.on('touchend', '.checkbox', function(e) {
238 var $this = $(this); 246 var $this = $(this);
239 247
240 - orderInfo('invoice', $this.find('.checkbox').hasClass('icon-cb-checked')); 248 + orderInfo('invoice', $this.hasClass('icon-cb-checked'));
241 e.preventDefault(); 249 e.preventDefault();
242 e.stopPropagation(); 250 e.stopPropagation();
243 }); 251 });