|
@@ -18,6 +18,8 @@ var dispatchModeHammer, |
|
@@ -18,6 +18,8 @@ var dispatchModeHammer, |
18
|
$price = $('.price-cal'),
|
18
|
$price = $('.price-cal'),
|
19
|
$couponUse = $('.coupon-use.used'),
|
19
|
$couponUse = $('.coupon-use.used'),
|
20
|
$addressWrap = $('.address-wrap'),
|
20
|
$addressWrap = $('.address-wrap'),
|
|
|
21
|
+ $coinCheck = $('.coin-check'),
|
|
|
22
|
+ $coinUsed = $('.coin .used'),
|
21
|
payType,
|
23
|
payType,
|
22
|
priceTmpl = Handlebars.compile($('#tmpl-price').html()),
|
24
|
priceTmpl = Handlebars.compile($('#tmpl-price').html()),
|
23
|
queryString = $.queryString(),
|
25
|
queryString = $.queryString(),
|
|
@@ -104,6 +106,8 @@ function orderCompute() { |
|
@@ -104,6 +106,8 @@ function orderCompute() { |
104
|
if (res.last_order_amount) {
|
106
|
if (res.last_order_amount) {
|
105
|
res.last_order_amount = (+res.last_order_amount).toFixed(2);
|
107
|
res.last_order_amount = (+res.last_order_amount).toFixed(2);
|
106
|
}
|
108
|
}
|
|
|
109
|
+ $coinCheck.find('em').html('- ¥ ' + res.use_yoho_coin);
|
|
|
110
|
+ $coinUsed.html('已抵¥' + res.use_yoho_coin);
|
107
|
priceHtml = priceTmpl({
|
111
|
priceHtml = priceTmpl({
|
108
|
cartPayData: res.promotion_formula_list,
|
112
|
cartPayData: res.promotion_formula_list,
|
109
|
price: res.last_order_amount
|
113
|
price: res.last_order_amount
|
|
@@ -212,9 +216,13 @@ $('.coin').on('touchend', function() { |
|
@@ -212,9 +216,13 @@ $('.coin').on('touchend', function() { |
212
|
if ($this.find('.checkbox').hasClass('icon-cb-checked')) {
|
216
|
if ($this.find('.checkbox').hasClass('icon-cb-checked')) {
|
213
|
orderInfo('yohoCoin', $this.data('yoho-coin'));
|
217
|
orderInfo('yohoCoin', $this.data('yoho-coin'));
|
214
|
$this.find('.coin-check em').show();
|
218
|
$this.find('.coin-check em').show();
|
|
|
219
|
+ $this.find('.can-use').hide();
|
|
|
220
|
+ $this.find('.used').show();
|
215
|
} else {
|
221
|
} else {
|
216
|
orderInfo('yohoCoin', 0);
|
222
|
orderInfo('yohoCoin', 0);
|
217
|
$this.find('.coin-check em').hide();
|
223
|
$this.find('.coin-check em').hide();
|
|
|
224
|
+ $this.find('.can-use').show();
|
|
|
225
|
+ $this.find('.used').hide();
|
218
|
}
|
226
|
}
|
219
|
orderCompute();
|
227
|
orderCompute();
|
220
|
});
|
228
|
});
|