From 1bd80326ecd240c38ab0d27ec8747546a0a5dfd3 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Fri, 24 May 2024 16:47:48 +0800 Subject: [PATCH] =?UTF-8?q?task#13769,=E5=8F=B8=E6=9C=BA=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E6=A0=BC=E5=BC=8F=E8=A7=84=E6=95=B4=EF=BC=8C?= =?UTF-8?q?=E6=9C=AA=E8=AF=86=E5=88=AB=E5=88=B0=E6=97=B6=E4=B8=8D=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/driverAdd.vue | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue index f64490f1..955c587d 100644 --- a/src/views/index/driverAdd.vue +++ b/src/views/index/driverAdd.vue @@ -274,14 +274,20 @@ export default { cardSide: 'BACK' }); this.idCardAuthority=res.data.authority - let date=res.data.validDate.split('-') - this.idCardValidStartTime=formatDate1(date[0]) +' '+ '00:00:00'; - if(date[1] == '长期'){ - this.idCardValidEndTime='2099/12/12' +' '+ '00:00:00'; - }else{ - this.idCardValidEndTime=formatDate1(date[1]) +' '+ '00:00:00'; + if(!res.data.validDate){ + return + } + let date=res.data.validDate.split('-') + if(date[0]){ + this.idCardValidStartTime=formatDate1(date[0]) +' '+ '00:00:00'; + } + if(date[1]){ + if(date[1] == '长期'){ + this.idCardValidEndTime='2099/12/12' +' '+ '00:00:00'; + }else{ + this.idCardValidEndTime=formatDate1(date[1]) +' '+ '00:00:00'; + } } - console.log("==",this.idCardValidEndTime) }, async drivingLicenceOcrHandler() { // 驾驶证正面 ocr识别 this.driverInfo.drivingLicenceValidityDate = '';