From 2fa7641c1b453ea3bed5aa4fba91047c19e61fe8 Mon Sep 17 00:00:00 2001 From: xingyy <373639591@qq.com> Date: Tue, 23 Jul 2024 19:10:26 +0800 Subject: [PATCH] 123 --- package.json | 2 +- src/views/upload-id-card/content/complete.vue | 9 ++++++--- src/views/upload-id-card/content/one.vue | 9 ++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 03d9636..60f6d74 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "test": "vite", + "test": "vite --mode test", "prod": "vite --mode prod", "build-test": "vite build --mode test", "build-prod": "vite build --mode prod", diff --git a/src/views/upload-id-card/content/complete.vue b/src/views/upload-id-card/content/complete.vue index efbe28b..2034e6e 100644 --- a/src/views/upload-id-card/content/complete.vue +++ b/src/views/upload-id-card/content/complete.vue @@ -10,8 +10,11 @@ const goLink=()=>{ @@ -20,7 +23,7 @@ const goLink=()=>{ margin-bottom: 340px; box-sizing: border-box; width: 333px; - height: 198px; + background-color: #fff; border-radius: 10px; padding: 23px 34px 28px; diff --git a/src/views/upload-id-card/content/one.vue b/src/views/upload-id-card/content/one.vue index 9f94d5e..298c50c 100644 --- a/src/views/upload-id-card/content/one.vue +++ b/src/views/upload-id-card/content/one.vue @@ -9,7 +9,9 @@ import dayjs from "dayjs"; const userStore = useUserStore() const {idCardInfo,iDCardImage} = storeToRefs(userStore); +const Num=ref(0) const afterRead = async (file, num) => { + Num.value=num const res = await upload_img({ file: file.file, source: "artwork", @@ -27,7 +29,6 @@ const afterRead = async (file, num) => { const compareDate=(givenDate)=> { const inputDate = dayjs(givenDate); const now = dayjs(); - if (inputDate.isBefore(now)) { return '证件已到期,请尽快更新,否则将影响部分功能使用!'; } else if (inputDate.isBefore(now.add(3, 'month'))) { @@ -48,6 +49,12 @@ const cardFace = async (img, num) => { idCardInfo.value.expirationDate=res.data.expirationDate idCardInfo.value.issueDate=res.data.issueDate } + }else if (res.status === 1) { +if(Num.value===0){ + iDCardImage.value.front='' +}else if(Num.value===1){ + iDCardImage.value.back='' +} } }