Commit 0b35e094 authored by leiqingsong's avatar leiqingsong

修改银行卡限制

parent b5f24880
......@@ -25,6 +25,7 @@
/>
<van-field
v-model="form.idCardNo"
maxlength="18"
label="身份证号"
placeholder="请输入"
size="large"
......@@ -102,6 +103,11 @@ export default {
return;
} else if (!this.form.idCardNo) {
this.$toast.fail("请输入身份证号");
return;
}
if (!/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(this.form.idCardNo)) {
this.$toast.fail("请输入正确的身份证号");
return;
}
const params = this.form;
if (this.form.id) {
......
......@@ -102,7 +102,7 @@
<script>
import { getWithdrawalAmount } from "@/api/wallet";
import { getUserBankInfo, cashOut, getTaxRate } from "@/api/bank";
import { getUserBankInfo, sendSms, cashOut, getTaxRate } from "@/api/bank";
import BaseDialog from "@/components/BaseDialog.vue";
export default {
components: { BaseDialog },
......@@ -139,12 +139,16 @@ export default {
}
},
sendVerification() {
console.log(123);
this.timeDown();
// const params = {
// userId_dss: JSON.parse(localStorage.getItem("user")).userId
// };
// sendSms(params).then();
const params = {
userId: JSON.parse(localStorage.getItem("user")).userId
};
sendSms(params).then(res => {
if (res.code == 0) {
this.timeDown();
} else {
this.$toast.fail(res.message);
}
});
},
timeDown() {
this.canSend = false;
......
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