Showing
1 changed file
with
6 additions
and
2 deletions
@@ -97,9 +97,11 @@ function compute(coin) { | @@ -97,9 +97,11 @@ function compute(coin) { | ||
97 | var res; | 97 | var res; |
98 | 98 | ||
99 | if (data.code === 200) { | 99 | if (data.code === 200) { |
100 | - | ||
101 | res = data.data; | 100 | res = data.data; |
102 | 101 | ||
102 | + // update yoho coin max use num | ||
103 | + $coin.data('max', res.canUseCoinNum); | ||
104 | + | ||
103 | // update yoho coin using | 105 | // update yoho coin using |
104 | $('#using-coin-cont').html(coinTpl(res)); | 106 | $('#using-coin-cont').html(coinTpl(res)); |
105 | 107 | ||
@@ -212,7 +214,9 @@ $('.balance-detail').on('click', '.modify-coin', function() { | @@ -212,7 +214,9 @@ $('.balance-detail').on('click', '.modify-coin', function() { | ||
212 | }); | 214 | }); |
213 | 215 | ||
214 | // delivery way change trigger compute | 216 | // delivery way change trigger compute |
215 | -$('input[name="delivery-way-radio"]').change(compute); | 217 | +$('input[name="delivery-way-radio"]').change(function() { |
218 | + compute(); | ||
219 | +}); | ||
216 | 220 | ||
217 | // 去支付 | 221 | // 去支付 |
218 | $('#go-pay').click(function() { | 222 | $('#go-pay').click(function() { |
-
Please register or login to post a comment