|
@@ -39,7 +39,7 @@
|
|
|
<span class="sym">{{ $t('balance.symbol') }}</span>
|
|
<span class="sym">{{ $t('balance.symbol') }}</span>
|
|
|
{{ item }}
|
|
{{ item }}
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="input-wrapper">
|
|
|
|
|
|
|
+ <!-- <div class="input-wrapper">
|
|
|
<span class="sym">{{ $t('balance.symbol') }}</span>
|
|
<span class="sym">{{ $t('balance.symbol') }}</span>
|
|
|
<ion-input
|
|
<ion-input
|
|
|
color="dark"
|
|
color="dark"
|
|
@@ -52,7 +52,7 @@
|
|
|
:min="50"
|
|
:min="50"
|
|
|
:max="100000"
|
|
:max="100000"
|
|
|
></ion-input>
|
|
></ion-input>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</ion-content>
|
|
</ion-content>
|
|
@@ -95,6 +95,8 @@
|
|
|
inputmode="decimal"
|
|
inputmode="decimal"
|
|
|
:size="36"
|
|
:size="36"
|
|
|
clearInput
|
|
clearInput
|
|
|
|
|
+ @ionBlur="formatAmount"
|
|
|
|
|
+ autofocus
|
|
|
></ion-input>
|
|
></ion-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="item">
|
|
<div class="item">
|
|
@@ -140,7 +142,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
showRecharge: false,
|
|
showRecharge: false,
|
|
|
rechargeAmount: 100,
|
|
rechargeAmount: 100,
|
|
|
- amountOptions: [100, 200, 300, 600, 800, 1000],
|
|
|
|
|
|
|
+ amountOptions: [50, 100, 200, 500, 1000, 2000, 3000, 5000, 10000],
|
|
|
customAmount: null,
|
|
customAmount: null,
|
|
|
showWithdrawModal: false,
|
|
showWithdrawModal: false,
|
|
|
withdrawAmount: null,
|
|
withdrawAmount: null,
|
|
@@ -247,7 +249,18 @@ export default {
|
|
|
this.$toast.error(e.error)
|
|
this.$toast.error(e.error)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ formatAmount() {
|
|
|
|
|
+ console.log('formatAmount', this.withdrawAmount)
|
|
|
|
|
+ if (this.withdrawAmount && Number(this.withdrawAmount)) {
|
|
|
|
|
+ let amount = Math.floor(this.withdrawAmount / 100) * 100
|
|
|
|
|
+ if (amount === 100) {
|
|
|
|
|
+ amount = 120
|
|
|
|
|
+ }
|
|
|
|
|
+ this.withdrawAmount = amount
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
withdraw() {
|
|
withdraw() {
|
|
|
|
|
+ this.formatAmount()
|
|
|
const amount = Number(this.withdrawAmount)
|
|
const amount = Number(this.withdrawAmount)
|
|
|
if (!amount || this.withdrawAmount <= 0 || this.withdrawAmount > this.balance.balance) {
|
|
if (!amount || this.withdrawAmount <= 0 || this.withdrawAmount > this.balance.balance) {
|
|
|
this.$toast.error(this.$t('balance.withdrawAmountError'))
|
|
this.$toast.error(this.$t('balance.withdrawAmountError'))
|
|
@@ -399,7 +412,7 @@ export default {
|
|
|
line-height: 40px;
|
|
line-height: 40px;
|
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
|
border-radius: 2px;
|
|
border-radius: 2px;
|
|
|
- font-size: 26px;
|
|
|
|
|
|
|
+ font-size: 24px;
|
|
|
.f();
|
|
.f();
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: baseline;
|
|
align-items: baseline;
|