|
|
|
@ -20,8 +20,8 @@ |
|
|
|
|
<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" ref='inputClear' type="digit" name="money" @input="wordsAmount" |
|
|
|
|
:placeholder="words.money_placeholder.value" /> |
|
|
|
|
<input class="input" v-model="inputValue" type="digit" name="money" |
|
|
|
|
@input="wordsAmount" :placeholder="words.money_placeholder.value" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -135,7 +135,8 @@ |
|
|
|
|
// 背景图 |
|
|
|
|
background: undefined, |
|
|
|
|
// 按钮禁用 |
|
|
|
|
disabled: false |
|
|
|
|
disabled: false, |
|
|
|
|
inputValue: null |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -149,7 +150,6 @@ |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
wordsAmount(e) { |
|
|
|
|
console.log(this.form) |
|
|
|
|
let amount = e.detail.value |
|
|
|
|
let num = null |
|
|
|
|
num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1') |
|
|
|
@ -175,14 +175,11 @@ |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
this.$refs.inputClear.setValue() |
|
|
|
|
this.inputValue = '' |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
} else { |
|
|
|
|
if (!num) { // 判断value值是否等于空,为空amount默认0, |
|
|
|
|
this.$refs.inputClear.setValue() |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
} else { |
|
|
|
|
this.$refs.inputClear.setValue() |
|
|
|
|
this.inputValue = '' |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -229,9 +226,9 @@ |
|
|
|
|
}) { |
|
|
|
|
const app = this |
|
|
|
|
// 表单验证 |
|
|
|
|
if (!app.onValidation(detail.value)) { |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
// if (!app.onValidation(detail.value)) { |
|
|
|
|
// return false |
|
|
|
|
// } |
|
|
|
|
// 确认是否提交 |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '友情提示', |
|
|
|
@ -252,7 +249,6 @@ |
|
|
|
|
const app = this |
|
|
|
|
app.disabled = true |
|
|
|
|
data.pay_type = app.payment |
|
|
|
|
console.log(data) |
|
|
|
|
WithdrawApi.submit({ |
|
|
|
|
form: data |
|
|
|
|
}) |
|
|
|
|