Authored by 郝肖肖

套餐选择优惠券返回路径修复

... ... @@ -261,7 +261,6 @@ exports.selectCoupon = (req, res) => {
let headerData = headerModel.setNav({
navTitle: '选择优惠券',
backUrl: helpers.urlFormat('/cart/index/new/orderEnsure', {cartType: req.cookies._cartType}),
navBtn: false
});
... ...
... ... @@ -59,7 +59,7 @@ $newCoupon.on('submit', function() {
orderInfo('yohoCoin', 0);
orderInfo('couponCode', res.data.coupon_code);
orderInfo('couponName', res.data.coupon_title);
window.location.href = '/cart/index/new/orderEnsure';
history.go(-1);
}
}).fail(function() {
tip.show('网络错误');
... ... @@ -85,7 +85,7 @@ $('body').on('touchend', '.not-use', function() {
// 实付金额发生变化,使用有货币为0
orderInfo('yohoCoin', 0);
location.href = '/cart/index/new/orderEnsure';
history.go(-1);
});
... ... @@ -142,7 +142,7 @@ function getCouponHandle(allCoupons) {
// 实付金额发生变化,使用有货币为0
orderInfo('yohoCoin', 0);
window.location.href = '/cart/index/new/orderEnsure';
history.go(-1);
} else if (res.message) {
tip.show(res.message);
}
... ...
... ... @@ -22,8 +22,7 @@ var $invoiceNotice = $('.invoice-notice'),
$copyTel = $('.copy-tel'),
isModifyTel = false;
var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/,
linkUrl = document.referrer || '/cart/index/new/orderEnsure?cartType=ordinary';
var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
var C_ID = window._ChannelVary[window.cookie('_Channel')] || 1;
... ... @@ -93,13 +92,13 @@ function confirmAction() {
autoHide: true,
fast: true
});
window.location.href = linkUrl;
history.go(-1);
}, function() {
window.location.href = linkUrl;
history.go(-1);
});
}
} else {
window.location.href = linkUrl;
history.go(-1);
}
}
... ...