|
|
|
@ -20,7 +20,7 @@ |
|
|
|
|
<view class="capital__item dis-flex flex-y-center"> |
|
|
|
|
<view class="item__left">{{ words.money.value }}:</view> |
|
|
|
|
<view class="item__right flex-box"> |
|
|
|
|
<input class="input" type="digit" name="money" @input="wordsAmount" |
|
|
|
|
<input class="input" ref='inputClear' type="digit" name="money" @input="wordsAmount" |
|
|
|
|
:placeholder="words.money_placeholder.value" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -149,7 +149,7 @@ |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
wordsAmount(e) { |
|
|
|
|
console.log(this.words.money) |
|
|
|
|
console.log(this.form) |
|
|
|
|
let amount = e.detail.value |
|
|
|
|
let num = null |
|
|
|
|
num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1') |
|
|
|
@ -170,18 +170,19 @@ |
|
|
|
|
} |
|
|
|
|
if (num > Number(this.settlement.min_money)) { // 判断value值是否小于等于100, 如果大于100限制输入100 |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: this.settlement.min_money > 0 ? `最多可用${Number(this.settlement.min_money)}元, 请重新输入` : '暂无可提现金额', |
|
|
|
|
title: this.settlement.min_money > 0 ? `最多可用${Number(this.settlement.min_money)}元, 请重新输入` : |
|
|
|
|
'暂无可提现金额', |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
// this.words.money = this.settlement.min_money > 0 ? this.settlement.min_money : '' |
|
|
|
|
this.$refs.inputClear.setValue() |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
} else { |
|
|
|
|
if (!num) { // 判断value值是否等于空,为空amount默认0, |
|
|
|
|
this.words.money = '' |
|
|
|
|
this.$refs.inputClear.setValue() |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
} else { |
|
|
|
|
// this.words.money = num |
|
|
|
|
this.$refs.inputClear.setValue() |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -251,6 +252,7 @@ |
|
|
|
|
const app = this |
|
|
|
|
app.disabled = true |
|
|
|
|
data.pay_type = app.payment |
|
|
|
|
console.log(data) |
|
|
|
|
WithdrawApi.submit({ |
|
|
|
|
form: data |
|
|
|
|
}) |
|
|
|
|