f
This commit is contained in:
@@ -747,7 +747,12 @@ const clearBusinessLicense = () => {
|
|||||||
const handleAuthorizedRepIDFrontChange = async (file, fileList) => {
|
const handleAuthorizedRepIDFrontChange = async (file, fileList) => {
|
||||||
authorizedRepIDFrontFileList.value = fileList
|
authorizedRepIDFrontFileList.value = fileList
|
||||||
if (file?.raw && !file.response?.url) {
|
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()
|
updateAuthorizedRepIDImageURLs()
|
||||||
}
|
}
|
||||||
@@ -761,7 +766,12 @@ const handleAuthorizedRepIDFrontRemove = (file, fileList) => {
|
|||||||
const handleAuthorizedRepIDBackChange = async (file, fileList) => {
|
const handleAuthorizedRepIDBackChange = async (file, fileList) => {
|
||||||
authorizedRepIDBackFileList.value = fileList
|
authorizedRepIDBackFileList.value = fileList
|
||||||
if (file?.raw && !file.response?.url) {
|
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()
|
updateAuthorizedRepIDImageURLs()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ defineProps({
|
|||||||
const emit = defineEmits(['refresh'])
|
const emit = defineEmits(['refresh'])
|
||||||
|
|
||||||
const refreshing = ref(false)
|
const refreshing = ref(false)
|
||||||
|
const pollTimer = ref(null)
|
||||||
|
|
||||||
const handleRefresh = async () => {
|
const handleRefresh = async () => {
|
||||||
refreshing.value = true
|
refreshing.value = true
|
||||||
@@ -58,6 +59,20 @@ const handleRefresh = async () => {
|
|||||||
refreshing.value = false
|
refreshing.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// 人工审核阶段:自动轮询状态,审核通过后会在父组件中自动切换步骤
|
||||||
|
pollTimer.value = window.setInterval(() => {
|
||||||
|
emit('refresh')
|
||||||
|
}, 5000)
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (pollTimer.value) {
|
||||||
|
window.clearInterval(pollTimer.value)
|
||||||
|
pollTimer.value = null
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user