Commit 98acd3a1 authored by leiqingsong's avatar leiqingsong

提现倒计时

parent 66cd7bbd
......@@ -70,7 +70,7 @@ export default {
cardNumber: "",
name: "",
id: "",
idCardNo:'',
idCardNo: ""
}
};
},
......@@ -100,7 +100,7 @@ export default {
} else if (!this.form.name) {
this.$toast.fail("请填写姓名");
return;
}else if(!this.form.idCardNo){
} else if (!this.form.idCardNo) {
this.$toast.fail("请输入身份证号");
}
const params = this.form;
......
......@@ -64,6 +64,7 @@
type="number"
class="validCodeInput"
placeholder="请输入"
center
>
<img
slot="left-icon"
......@@ -75,11 +76,10 @@
size="small"
type="primary"
class="verify-code"
:disabled="disabled"
@click="sendSms"
@click="sendVerification"
>
<span v-if="!disabled">发送验证码</span>
<span v-else>{{ time }}秒后重新发送</span>
<span v-if="!canSend">{{ time }}秒后重新发送</span>
<span v-else>发送验证码</span>
</van-button>
</van-field>
</div>
......@@ -102,7 +102,7 @@
<script>
import { getWithdrawalAmount } from "@/api/wallet";
import { getUserBankInfo, sendSms, cashOut, getTaxRate } from "@/api/bank";
import { getUserBankInfo, cashOut, getTaxRate } from "@/api/bank";
import BaseDialog from "@/components/BaseDialog.vue";
export default {
components: { BaseDialog },
......@@ -120,11 +120,11 @@ export default {
resultDialogTip: "",
resultDialogImg: "",
resultDialog: false,
disabled: false,
canSend: true,
textName: "",
validCodeDialogShow: false,
validCode: null,
time: 60,
time: 60
};
},
created() {
......@@ -138,11 +138,23 @@ export default {
return false;
}
},
sendSms() {
const _this = this;
_this.time = 60;
_this.disabled = true;
sendVerification() {
console.log(123);
this.timeDown();
// const params = {
// userId_dss: JSON.parse(localStorage.getItem("user")).userId
// };
// sendSms(params).then();
},
timeDown() {
this.canSend = false;
const timer = setInterval(() => {
this.time -= 1;
if (this.time <= 0) {
clearInterval(timer);
this.canSend = true;
}
}, 1000);
},
inputClick() {
......@@ -184,10 +196,6 @@ export default {
this.$toast.fail("输入超过可提现金额,请重新输入");
return;
}
const params = {
userId: JSON.parse(localStorage.getItem("user")).userId
};
sendSms(params).then();
this.validCode = null;
this.validCodeDialogShow = true;
},
......
......@@ -159,7 +159,7 @@ export default {
console.log("tab", name);
this.getRecommendDetail(name);
},
changeTabs(name){
changeTabs(name) {
console.log("tab", name);
this.getRecommendDetail(name);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment