This commit is contained in:
李志鹏
2025-10-30 16:41:19 +08:00
parent d2624bf5cc
commit 69690a4243
2 changed files with 2 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ export const useGenerateStore = defineStore({
updatePhotoInfo(data: any) {
this.photoInfo.id = data.id || ''
if (!data.photoUrl) this.photoInfo.url = ''
this.photoInfo.file = null
this.photoInfo.file = data.file || null
},
/** 清空 AI魔改信息 */
clearCustomizeInfo() {

View File

@@ -44,7 +44,7 @@
formData.append('visitRecordId', generateStore.visitRecordId + '')
formData.append('file', fileData.file)
uploadCustomerPhoto(formData).then((res) => {
generateStore.updatePhotoInfo(res)
generateStore.updatePhotoInfo({...res, file: fileData.file})
generateStore.clearCustomizeInfo()
router.push({ name: 'customize' })
})