Showing
1 changed file
with
7 additions
and
3 deletions
@@ -577,6 +577,7 @@ coupon = { | @@ -577,6 +577,7 @@ coupon = { | ||
577 | }); | 577 | }); |
578 | }, | 578 | }, |
579 | changeTicketsUse: function() { | 579 | changeTicketsUse: function() { |
580 | + var that = this; | ||
580 | var coupons = [], | 581 | var coupons = [], |
581 | price = 0; | 582 | price = 0; |
582 | 583 | ||
@@ -591,12 +592,15 @@ coupon = { | @@ -591,12 +592,15 @@ coupon = { | ||
591 | 592 | ||
592 | if (coupons.length) { | 593 | if (coupons.length) { |
593 | this.$ticketUseTip.find('.num').text(coupons.length); | 594 | this.$ticketUseTip.find('.num').text(coupons.length); |
594 | - this.$ticketUseTip.find('.price').text('- ¥' + price.toFixed(2)); | ||
595 | - this.$ticketUseTip.removeClass('hide'); | ||
596 | order.couponCode = coupons.join(','); | 595 | order.couponCode = coupons.join(','); |
597 | 596 | ||
598 | // 重新计算订单价格 | 597 | // 重新计算订单价格 |
599 | - compute(); | 598 | + compute(0, function(data) { |
599 | + if (data.code === 200) { | ||
600 | + that.$ticketUseTip.find('.price').text('- ¥' + data.data.coupon_amount.toFixed(2)); | ||
601 | + that.$ticketUseTip.removeClass('hide'); | ||
602 | + } | ||
603 | + }); | ||
600 | } | 604 | } |
601 | }, | 605 | }, |
602 | cancelTicketUse: function() { | 606 | cancelTicketUse: function() { |
-
Please register or login to post a comment