fix: BUG修改
This commit is contained in:
parent
4c8a0ee8da
commit
7f8508a6e0
@ -56,7 +56,7 @@ export default {
|
||||
// const idCard = this.value;
|
||||
const res = await entryCodeApi(params);
|
||||
console.log(res);
|
||||
if (res.success == true) {
|
||||
if (res.success == true && res.result) {
|
||||
this.id = res.result.id;
|
||||
console.log("this.id:" + this.id);
|
||||
this.$router.push({
|
||||
@ -65,14 +65,18 @@ export default {
|
||||
});
|
||||
// this.$router.push({path: '/entryCodeDetail'});
|
||||
} else {
|
||||
console.log("没有查到信息");
|
||||
// console.log("没有查到信息");
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "没有查到相关信息",
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
validateIdCard() {
|
||||
// 身份证号码正则表达式,简单示例
|
||||
const idCardRegex =
|
||||
/^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])([0-2][1-9]|10|20|30)\d{3}[\dX]$/;
|
||||
/^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
|
||||
// 验证身份证号码格式
|
||||
this.isValidIdCard = idCardRegex.test(this.value);
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user