1
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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' })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user