This commit is contained in:
Mrx
2026-03-18 16:04:49 +08:00
parent c90259e3f4
commit 6818456070
2 changed files with 27 additions and 2 deletions

View File

@@ -747,7 +747,12 @@ const clearBusinessLicense = () => {
const handleAuthorizedRepIDFrontChange = async (file, fileList) => {
authorizedRepIDFrontFileList.value = fileList
if (file?.raw && !file.response?.url) {
await uploadFileOnceSelected(file)
const url = await uploadFileOnceSelected(file)
if (url) {
authorizedRepIDFrontFileList.value = authorizedRepIDFrontFileList.value.map((f) =>
f.uid === file.uid ? { ...f, status: 'success', response: { url }, url: f.url } : f
)
}
}
updateAuthorizedRepIDImageURLs()
}
@@ -761,7 +766,12 @@ const handleAuthorizedRepIDFrontRemove = (file, fileList) => {
const handleAuthorizedRepIDBackChange = async (file, fileList) => {
authorizedRepIDBackFileList.value = fileList
if (file?.raw && !file.response?.url) {
await uploadFileOnceSelected(file)
const url = await uploadFileOnceSelected(file)
if (url) {
authorizedRepIDBackFileList.value = authorizedRepIDBackFileList.value.map((f) =>
f.uid === file.uid ? { ...f, status: 'success', response: { url }, url: f.url } : f
)
}
}
updateAuthorizedRepIDImageURLs()
}

View File

@@ -49,6 +49,7 @@ defineProps({
const emit = defineEmits(['refresh'])
const refreshing = ref(false)
const pollTimer = ref(null)
const handleRefresh = async () => {
refreshing.value = true
@@ -58,6 +59,20 @@ const handleRefresh = async () => {
refreshing.value = false
}
}
onMounted(() => {
// 人工审核阶段:自动轮询状态,审核通过后会在父组件中自动切换步骤
pollTimer.value = window.setInterval(() => {
emit('refresh')
}, 5000)
})
onUnmounted(() => {
if (pollTimer.value) {
window.clearInterval(pollTimer.value)
pollTimer.value = null
}
})
</script>
<style scoped>