From 7f8508a6e0eaa30b8e05594a584222117dd9e8a5 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Sat, 25 May 2024 09:48:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectFront/entryCode/myLogin.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/projectFront/entryCode/myLogin.vue b/src/views/projectFront/entryCode/myLogin.vue index e73e0748..7f0ed0c4 100644 --- a/src/views/projectFront/entryCode/myLogin.vue +++ b/src/views/projectFront/entryCode/myLogin.vue @@ -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); },