Commit 0b35e094 authored by leiqingsong's avatar leiqingsong

修改银行卡限制

parent b5f24880
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
/> />
<van-field <van-field
v-model="form.idCardNo" v-model="form.idCardNo"
maxlength="18"
label="身份证号" label="身份证号"
placeholder="请输入" placeholder="请输入"
size="large" size="large"
...@@ -102,6 +103,11 @@ export default { ...@@ -102,6 +103,11 @@ export default {
return; return;
} else if (!this.form.idCardNo) { } else if (!this.form.idCardNo) {
this.$toast.fail("请输入身份证号"); 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; const params = this.form;
if (this.form.id) { if (this.form.id) {
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<script> <script>
import { getWithdrawalAmount } from "@/api/wallet"; 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"; import BaseDialog from "@/components/BaseDialog.vue";
export default { export default {
components: { BaseDialog }, components: { BaseDialog },
...@@ -139,12 +139,16 @@ export default { ...@@ -139,12 +139,16 @@ export default {
} }
}, },
sendVerification() { sendVerification() {
console.log(123); const params = {
this.timeDown(); userId: JSON.parse(localStorage.getItem("user")).userId
// const params = { };
// userId_dss: JSON.parse(localStorage.getItem("user")).userId sendSms(params).then(res => {
// }; if (res.code == 0) {
// sendSms(params).then(); this.timeDown();
} else {
this.$toast.fail(res.message);
}
});
}, },
timeDown() { timeDown() {
this.canSend = false; 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