添加来自购物车的链接默认不使用优惠券的逻辑
Code Review by Rock Zhang
Showing
1 changed file
with
6 additions
and
0 deletions
@@ -40,6 +40,12 @@ if ($couponUse.data('name') !== orderInfo('couponName')) { | @@ -40,6 +40,12 @@ if ($couponUse.data('name') !== orderInfo('couponName')) { | ||
40 | orderInfo('couponName', null); | 40 | orderInfo('couponName', null); |
41 | } | 41 | } |
42 | 42 | ||
43 | +// 来自购物车的链接默认不使用优惠券 | ||
44 | +if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) { | ||
45 | + orderInfo('couponCode', null); | ||
46 | + orderInfo('couponName', null); | ||
47 | +} | ||
48 | + | ||
43 | if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) { | 49 | if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) { |
44 | orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary'); | 50 | orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary'); |
45 | } | 51 | } |
-
Please register or login to post a comment