From 52688206108416aa4bb6c21698acb7a136100651 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Thu, 13 Nov 2025 12:30:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(KYC=E9=A1=B5=E9=9D=A2):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=8E=B7=E5=8F=96=E4=B8=8A=E4=B8=80=E6=AC=A1=E6=B3=A8?= =?UTF-8?q?=E5=85=A5=E5=9B=BE=E7=89=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Wallet/CashOut/KYC.vue | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/views/Wallet/CashOut/KYC.vue b/src/views/Wallet/CashOut/KYC.vue index 875274d..509d35e 100644 --- a/src/views/Wallet/CashOut/KYC.vue +++ b/src/views/Wallet/CashOut/KYC.vue @@ -207,6 +207,9 @@ const count = computed(() => applyInfo.value.otherDescription.length) //字数 const tempFiles = ref([]) //用于提交的临时图片文件列表 // const previewUrls = ref([]) //预览图片数组 const resImgUrls = ref([]) //用于提交申请的图片数组 +const lastImgUrl = computed(() => { + return resImgUrls.value.length > 0 ? resImgUrls.value[resImgUrls.value.length - 1] : null +}) //上一次最新添加的图片 const updateStatus = ref(false) //是否为修改 @@ -243,9 +246,6 @@ const callNativeImagePicker = async () => { throw new Error('Maximum number of images reached') } - // 记录当前所有已选图片路径,用于去重判断 - const existingImagePaths = new Set(resImgUrls.value) - // 定义过滤函数 const filterDuplicateImages = (access) => { try { @@ -261,7 +261,7 @@ const callNativeImagePicker = async () => { console.log('检查图片数据:', file.path) // 如果是已存在的图片,返回false表示需要继续检查 - if (existingImagePaths.has(file.path)) { + if (lastImgUrl.value && file.path === lastImgUrl.value) { console.log('检测到重复图片,继续等待新图片...') return false } @@ -296,13 +296,7 @@ const callNativeImagePicker = async () => { const file = result.data console.log('接收到原生图片数据:', file.path) - if (existingImagePaths.has(file.path)) { - console.log('检测到重复图片,继续等待新图片...') - // 不处理重复图片,继续等待新的图片数据 - // 这里不调用 resolve 或 reject,让 uploadImgFile 继续检查 - return - } - + lastImgUrl.value = file.path // 更新上一次实际选择的图片路径 // 生成预览图 resImgUrls.value.push(file.path) resolve()