From 7e4e37a696664be75b8ea34a32aac0c9edc9cd56 Mon Sep 17 00:00:00 2001 From: leiyun Date: Sun, 22 Mar 2026 12:18:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/myinfo/myinfo.vue | 4 ++++ pages/verify/verify.vue | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pages/myinfo/myinfo.vue b/pages/myinfo/myinfo.vue index 2918d17..3ec62b9 100644 --- a/pages/myinfo/myinfo.vue +++ b/pages/myinfo/myinfo.vue @@ -447,6 +447,10 @@ const handleSubmit = async () => { if (!form.address.trim()) { return uni.showToast({ title: '请填写详细地址', icon: 'none' }) } + // 资料上传校验:至少上传一个 + if (!form.documents || form.documents.length === 0) { + return uni.showToast({ title: '请至少上传一份检查报告或诊断证明', icon: 'none' }) + } // 签名校验:全部必须签 if (!signedIncome.value) { return uni.showToast({ title: '请签署个人可支配收入声明', icon: 'none' }) diff --git a/pages/verify/verify.vue b/pages/verify/verify.vue index f1cb58b..6f113bb 100644 --- a/pages/verify/verify.vue +++ b/pages/verify/verify.vue @@ -68,11 +68,11 @@ 发证机关 - + 有效期限 - + @@ -145,6 +145,9 @@ const validateIdCard = (id) => { // 证件类型映射: certType -> idCardType (后端字段) const certTypeMap = { idcard: 1, child: 2, temp: 3 } +const authorityPlaceholder = ref('上传身份证后自动识别') +const validityPlaceholder = ref('上传身份证后自动识别') + const form = reactive({ frontImage: '', // 上传后的CDN URL backImage: '', @@ -231,9 +234,13 @@ const doOcrBack = async (imageUrl) => { const res = await post('/common/ocr/idcard', { imageUrl, cardSide: 'BACK' }) form.authority = res.data.authority || '' form.validity = res.data.validDate || '' + if (!form.authority) authorityPlaceholder.value = '请输入发证机关' + if (!form.validity) validityPlaceholder.value = '请输入有效期限' uni.hideLoading() } catch (e) { uni.hideLoading() + authorityPlaceholder.value = '请输入发证机关' + validityPlaceholder.value = '请输入有效期限' } }