Authored by yyq

Merge branch 'feature/shoppingCart' into release/5.4.1

... ... @@ -76,9 +76,7 @@ const getOrderComputeAsync = (uid, cartType, paymentType, deliveryWay, other) =>
Object.assign(param, {
coupon_code: other.couponCode
});
}
if (other.promotionCode) {
} else if (other.promotionCode) {
Object.assign(param, {
promotion_code: other.promotionCode
});
... ... @@ -157,6 +155,10 @@ const orderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliveryWay, p
Object.assign(param, {
coupon_code: other.couponCode
});
} else if (other.promotionCode) {
Object.assign(param, {
promotion_code: other.promotionCode
});
}
if (other.continueBuy) {
... ...
... ... @@ -81,6 +81,8 @@ function compute(coin, cb) {
// 优惠券
if (order.couponCode) {
reqData.couponCode = order.couponCode;
} else if (order.promotionCode) {
reqData.promotionCode = order.promotionCode;
}
// 红包
... ... @@ -493,7 +495,7 @@ coupon = {
couponId = $this.siblings('.coupon-code').val();
if (couponId) {
order.couponCode = couponId;
order.promotionCode = couponId;
// 重新计算订单价格
compute(0, function() {
... ... @@ -529,6 +531,10 @@ coupon = {
});
},
cancelTicketUse: function() {
if (order.promotionCode) {
delete order.promotionCode;
}
if (order.couponCode) {
this.$ticketUseTip.addClass('hide');
this.$radios.filter('.on').removeClass('on');
... ... @@ -543,6 +549,10 @@ coupon = {
if (order.couponCode) {
delete order.couponCode;
}
if (order.promotionCode) {
delete order.promotionCode;
compute(); // 重新计算订单价格
}
},
... ...