From a321ece6814997821d3ff567da04a7e783fa2c82 Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:30:59 +0800 Subject: [PATCH] submit --- src/components/operateTitle/index.vue | 83 +++++++++++++----------- src/views/reg-details/index.vue | 57 +++++++++++++--- src/views/replace-id-card/index.vue | 55 ++++++++++++++-- src/views/upload-id-card/content/one.vue | 31 +++++---- src/views/upload-id-card/content/two.vue | 3 +- src/views/upload-id-card/index.vue | 31 +++++++-- 6 files changed, 184 insertions(+), 76 deletions(-) diff --git a/src/components/operateTitle/index.vue b/src/components/operateTitle/index.vue index 5bdfe1c..bb2bb5f 100644 --- a/src/components/operateTitle/index.vue +++ b/src/components/operateTitle/index.vue @@ -1,65 +1,72 @@ diff --git a/src/views/reg-details/index.vue b/src/views/reg-details/index.vue index 106d999..04bbbe2 100644 --- a/src/views/reg-details/index.vue +++ b/src/views/reg-details/index.vue @@ -1,16 +1,17 @@ @@ -104,13 +141,13 @@ const goRouter=()=>{
身份证人像面
- +
身份证国徽面
- +
@@ -140,8 +177,8 @@ const goRouter=()=>{ -
-
*身份证即将到期/已到期,请及时更换→→→
+
+
{{compareDate(submitReturnData.idCardEndDate)}}
更换身份证
@@ -151,7 +188,7 @@ const goRouter=()=>{
- +
diff --git a/src/views/replace-id-card/index.vue b/src/views/replace-id-card/index.vue index 15f8d51..b5a53c7 100644 --- a/src/views/replace-id-card/index.vue +++ b/src/views/replace-id-card/index.vue @@ -1,5 +1,24 @@ diff --git a/src/views/upload-id-card/content/one.vue b/src/views/upload-id-card/content/one.vue index ce78901..9f94d5e 100644 --- a/src/views/upload-id-card/content/one.vue +++ b/src/views/upload-id-card/content/one.vue @@ -24,12 +24,17 @@ const afterRead = async (file, num) => { await cardFace(res.data.ori_url, num) } } -const isWithinThreeMonths=(dateStr)=> { +const compareDate=(givenDate)=> { + const inputDate = dayjs(givenDate); const now = dayjs(); - const targetDate = dayjs(dateStr); - const isEarlier = targetDate.isBefore(now); - const isWithinThreeMonths = now.diff(targetDate, 'month') < 3; - return isEarlier && isWithinThreeMonths; + + if (inputDate.isBefore(now)) { + return '证件已到期,请尽快更新,否则将影响部分功能使用!'; + } else if (inputDate.isBefore(now.add(3, 'month'))) { + return '证件即将到期,请尽快更新,否则将影响部分功能使用!'; + } else { + return '' + } } const cardFace = async (img, num) => { const res = await scan_id_card({ @@ -55,7 +60,7 @@ const cardFace = async (img, num) => {
-
更换
+
更换
上传身份证人像面
@@ -68,13 +73,13 @@ const cardFace = async (img, num) => {
-
更换
+
更换
上传身份证国徽面
-
+
姓名
@@ -94,21 +99,15 @@ const cardFace = async (img, num) => {
{{idCardInfo.iDNum}}
-
-
-
身份证地址
-
{{idCardInfo.path}}
-
-
有效日期
-
{{dayjs(idCardInfo.issueDate).format('YYYY年MM月DD日')}}-{{dayjs(idCardInfo.expirationDate).format('YYYY年MM月DD日')}}
+
{{idCardInfo.issueDate?dayjs(idCardInfo.issueDate).format('YYYY年MM月DD日'):''}}-{{idCardInfo.expirationDate?dayjs(idCardInfo.expirationDate).format('YYYY年MM月DD日'):''}}
*自动识别内容,请仔细核对
-
证件即将过期,请尽快更新,否则将影响部分功能使用!
+
{{compareDate(idCardInfo.expirationDate)}}
diff --git a/src/views/upload-id-card/content/two.vue b/src/views/upload-id-card/content/two.vue index dceee60..fa5b517 100644 --- a/src/views/upload-id-card/content/two.vue +++ b/src/views/upload-id-card/content/two.vue @@ -29,7 +29,7 @@ const afterRead = async (file) => {
-
更换
+
更换
上传近照
@@ -67,6 +67,7 @@ const afterRead = async (file) => { font-size: 10px; } .wrap1 { + overflow: hidden; width: 100%; height: 100%; box-sizing: border-box; diff --git a/src/views/upload-id-card/index.vue b/src/views/upload-id-card/index.vue index 139cd3f..5593e60 100644 --- a/src/views/upload-id-card/index.vue +++ b/src/views/upload-id-card/index.vue @@ -29,6 +29,7 @@ const contentComputed = computed(() => { } }) const submitClick =async () => { + const data={ artistName:idCardInfo.value.realName, gender:idCardInfo.value.sex==='男'?1:2, @@ -56,8 +57,10 @@ watch(active,()=>{ case 2: buttons.value = [{label: "上一步", type: "back"}, {label: "提交", type: "submit"}] break + case 3: + buttons.value = [{label: "完成", type: "finish"}] + break } - console.log(active.value,'active') },{ immediate:true }) @@ -74,7 +77,6 @@ const stepsClick = (item) => { active.value=1 router.replace(`/title-forward/upload-id-card/${1}`) - buttons.value = [{label: "上一步", type: "back"}, {label: "下一步", type: "next"}] break case 1: if (item.type === 'next') { @@ -87,27 +89,42 @@ const stepsClick = (item) => { } active.value=2 router.replace(`/title-forward/upload-id-card/${2}`) - buttons.value = [{label: "上一步", type: "back"}, {label: "提交", type: "submit"}] } else if (item.type === 'back') { active.value=0 router.replace(`/title-forward/upload-id-card/${0}`) - buttons.value = [{label: "下一步", type: "next"}] } break case 2: if (item.type === 'next') { active.value=3 router.replace(`/title-forward/upload-id-card/${3}`) - buttons.value = [{label: "上一步", type: "back"}, {label: "提交", type: "submit"}] } else if (item.type === 'back') { active.value=1 router.replace(`/title-forward/upload-id-card/${1}`) - buttons.value = [{label: "上一步", type: "back"}, {label: "下一步", type: "next"}] + }else if (item.type === 'submit'){ + if (selectAddress.value?.selectedOptions?.length<3 || !selectAddress.value?.selectedOptions){ + showToast({ + message:'请选择通讯地址', + className:'particulars-detail-popup' + }); + return + } + if (!detailAddress.value){ + showToast({ + message:'请输入详细地址', + className:'particulars-detail-popup' + }); + return + } submitClick() active.value=3 router.replace(`/title-forward/upload-id-card/${3}`) - buttons.value = [{label: "完成", type: "finish"}] + } + break + case 3: + if (item.type === 'finish') { + router.push('/title-forward/reg-details') } break }