|
|
|
@ -40,6 +40,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import putMoney from "../models/put-money-model.js"; |
|
|
|
import { Alert,Toast } from 'vux' |
|
|
|
export default{ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -51,6 +52,9 @@ |
|
|
|
currentAmount: 0, |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
Toast, |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
//验证输入框的值 |
|
|
|
inputVal: function (val) { |
|
|
|
@ -70,16 +74,14 @@ |
|
|
|
methods:{ |
|
|
|
//提交申请 |
|
|
|
submit() { |
|
|
|
if(this.isActive) { |
|
|
|
console.log(this.inputVal) |
|
|
|
if(this.isActive) { |
|
|
|
putMoney.putMoney( |
|
|
|
{amount:this.inputVal} |
|
|
|
).then(res => { |
|
|
|
console.log(res) |
|
|
|
if (res.code == 0){ |
|
|
|
this.$router.push({path:'/put-money-success'}); |
|
|
|
}else { |
|
|
|
alert(res.msg) |
|
|
|
this.$vux.toast.text(res.msg,'middle') |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|