feat(KYC页面): 修复获取重复图片的问题

This commit is contained in:
hzj 2025-11-13 11:08:30 +08:00
parent 73c9473cf6
commit 626a63f311

View File

@ -214,7 +214,6 @@ const tempFiles = ref([]) //用于提交的临时图片文件列表
const resImgUrls = ref([]) //
const updateStatus = ref(false) //
const isInAppEnvironment = ref(false)
const applyInfo = ref({
id: '', //ID
@ -249,6 +248,9 @@ const callNativeImagePicker = async () => {
throw new Error('Maximum number of images reached')
}
//
const existingImagePaths = new Set(resImgUrls.value)
return new Promise((resolve, reject) => {
try {
uploadImgFile(async (access) => {
@ -266,6 +268,13 @@ const callNativeImagePicker = async () => {
const file = result.data
console.log('接收到原生图片数据:', file.path)
if (existingImagePaths.has(file.path)) {
console.log('检测到重复图片,继续等待新图片...')
//
// resolve reject uploadImgFile
return
}
//
resImgUrls.value.push(file.path)
resolve()
@ -373,7 +382,6 @@ const updateWithdrawInfoData = async () => {
}
onMounted(() => {
isInAppEnvironment.value = isInApp()
getWithdrawInfoListData() //
})
</script>