From 8af98c5ef3da6ff4ef726648efc47ee225ac7681 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Wed, 15 May 2024 19:59:31 +0800 Subject: [PATCH] =?UTF-8?q?task#13769,=E6=97=B6=E9=97=B4=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.js | 4 ++-- src/views/index/driverAdd.vue | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/common.js b/src/utils/common.js index c5e3462f..69c795d0 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -5,8 +5,8 @@ const formatDate = date => { const day = tempDate.getDate() return `${[year, month, day].map(formatNumber).join('-')}` } -const formatDate1 = date => { - let tempDate = new Date(date) +const formatDate1 = () => { + let tempDate = new Date() const year = tempDate.getFullYear() const month = tempDate.getMonth() + 1 const day = tempDate.getDate() diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue index 2804d85e..3ed05979 100644 --- a/src/views/index/driverAdd.vue +++ b/src/views/index/driverAdd.vue @@ -275,14 +275,14 @@ export default { }); this.idCardAuthority=res.data.authority let date=res.data.validDate.split('-') - let tempDate = new Date(date[0]) - let year=tempDate.getFullYear() - this.$toast("date=="+tempDate+year) + // let tempDate = new Date(date[0]) + // let year=tempDate.getFullYear() + // this.$toast("date=="+tempDate+year) // let dateStartTime=date[0].split('.') // console.log("dateStartTime",dateStartTime) // this.idCardValidStartTime=dateStartTime[0] + dateStartTime[1] +dateStartTime[2] +' '+ '00:00:00'; this.idCardValidStartTime=formatDate1(date[0]) +' '+ '00:00:00'; - // this.$toast("idCardValidStartTime=="+this.idCardValidStartTime) + this.$toast("idCardValidStartTime=="+this.idCardValidStartTime) console.log("==",this.idCardValidStartTime) if(date[1] == '长期'){ this.idCardValidEndTime='2099/12/12' +' '+ '00:00:00';