diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue index 04a56863..d6c7422e 100644 --- a/src/views/index/driverAdd.vue +++ b/src/views/index/driverAdd.vue @@ -258,7 +258,12 @@ export default { }) this.driverName = res?.data?.name; this.identityCardNumber = res?.data?.idNum; - if( this.drivingLicenceName && this.driverName != this.drivingLicenceName ) { + let aaa='' + if(this.drivingLicenceName){ + aaa = this.drivingLicenceName.replace(/[^\u4e00-\u9fff]+/g, ''); + } + let bbb=this.driverName.replace(/[^\u4e00-\u9fff]+/g, ''); + if( this.drivingLicenceName && aaa != bbb ) { this.$toast('身份证信息与驾驶证信息不匹配') } }, @@ -299,7 +304,12 @@ export default { this.drivingModel = res.data?.class_; this.drivingLicenceName = res.data?.name - if( this.driverName && this.drivingLicenceName != this.driverName ) { + let aaa='' + if(this.driverName){ + aaa = this.driverName.replace(/[^\u4e00-\u9fff]+/g, ''); + } + let bbb = this.drivingLicenceName.replace(/[^\u4e00-\u9fff]+/g, ''); + if( this.driverName && bbb != aaa ) { this.$toast('身份证信息与驾驶证信息不匹配') } }