Showing
3 changed files
with
7 additions
and
9 deletions
@@ -261,7 +261,6 @@ exports.selectCoupon = (req, res) => { | @@ -261,7 +261,6 @@ exports.selectCoupon = (req, res) => { | ||
261 | 261 | ||
262 | let headerData = headerModel.setNav({ | 262 | let headerData = headerModel.setNav({ |
263 | navTitle: '选择优惠券', | 263 | navTitle: '选择优惠券', |
264 | - backUrl: helpers.urlFormat('/cart/index/new/orderEnsure', {cartType: req.cookies._cartType}), | ||
265 | navBtn: false | 264 | navBtn: false |
266 | }); | 265 | }); |
267 | 266 |
@@ -59,7 +59,7 @@ $newCoupon.on('submit', function() { | @@ -59,7 +59,7 @@ $newCoupon.on('submit', function() { | ||
59 | orderInfo('yohoCoin', 0); | 59 | orderInfo('yohoCoin', 0); |
60 | orderInfo('couponCode', res.data.coupon_code); | 60 | orderInfo('couponCode', res.data.coupon_code); |
61 | orderInfo('couponName', res.data.coupon_title); | 61 | orderInfo('couponName', res.data.coupon_title); |
62 | - window.location.href = '/cart/index/new/orderEnsure'; | 62 | + history.go(-1); |
63 | } | 63 | } |
64 | }).fail(function() { | 64 | }).fail(function() { |
65 | tip.show('网络错误'); | 65 | tip.show('网络错误'); |
@@ -85,7 +85,7 @@ $('body').on('touchend', '.not-use', function() { | @@ -85,7 +85,7 @@ $('body').on('touchend', '.not-use', function() { | ||
85 | 85 | ||
86 | // 实付金额发生变化,使用有货币为0 | 86 | // 实付金额发生变化,使用有货币为0 |
87 | orderInfo('yohoCoin', 0); | 87 | orderInfo('yohoCoin', 0); |
88 | - location.href = '/cart/index/new/orderEnsure'; | 88 | + history.go(-1); |
89 | }); | 89 | }); |
90 | 90 | ||
91 | 91 | ||
@@ -142,7 +142,7 @@ function getCouponHandle(allCoupons) { | @@ -142,7 +142,7 @@ function getCouponHandle(allCoupons) { | ||
142 | 142 | ||
143 | // 实付金额发生变化,使用有货币为0 | 143 | // 实付金额发生变化,使用有货币为0 |
144 | orderInfo('yohoCoin', 0); | 144 | orderInfo('yohoCoin', 0); |
145 | - window.location.href = '/cart/index/new/orderEnsure'; | 145 | + history.go(-1); |
146 | } else if (res.message) { | 146 | } else if (res.message) { |
147 | tip.show(res.message); | 147 | tip.show(res.message); |
148 | } | 148 | } |
@@ -22,8 +22,7 @@ var $invoiceNotice = $('.invoice-notice'), | @@ -22,8 +22,7 @@ var $invoiceNotice = $('.invoice-notice'), | ||
22 | $copyTel = $('.copy-tel'), | 22 | $copyTel = $('.copy-tel'), |
23 | isModifyTel = false; | 23 | isModifyTel = false; |
24 | 24 | ||
25 | -var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/, | ||
26 | - linkUrl = document.referrer || '/cart/index/new/orderEnsure?cartType=ordinary'; | 25 | +var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/; |
27 | 26 | ||
28 | var C_ID = window._ChannelVary[window.cookie('_Channel')] || 1; | 27 | var C_ID = window._ChannelVary[window.cookie('_Channel')] || 1; |
29 | 28 | ||
@@ -93,13 +92,13 @@ function confirmAction() { | @@ -93,13 +92,13 @@ function confirmAction() { | ||
93 | autoHide: true, | 92 | autoHide: true, |
94 | fast: true | 93 | fast: true |
95 | }); | 94 | }); |
96 | - window.location.href = linkUrl; | 95 | + history.go(-1); |
97 | }, function() { | 96 | }, function() { |
98 | - window.location.href = linkUrl; | 97 | + history.go(-1); |
99 | }); | 98 | }); |
100 | } | 99 | } |
101 | } else { | 100 | } else { |
102 | - window.location.href = linkUrl; | 101 | + history.go(-1); |
103 | } | 102 | } |
104 | } | 103 | } |
105 | 104 |
-
Please register or login to post a comment