1
This commit is contained in:
@@ -103,7 +103,7 @@ export const useGenerateStore = defineStore({
|
|||||||
updatePhotoInfo(data: any) {
|
updatePhotoInfo(data: any) {
|
||||||
this.photoInfo.id = data.id || ''
|
this.photoInfo.id = data.id || ''
|
||||||
if (!data.photoUrl) this.photoInfo.url = ''
|
if (!data.photoUrl) this.photoInfo.url = ''
|
||||||
this.photoInfo.file = null
|
this.photoInfo.file = data.file || null
|
||||||
},
|
},
|
||||||
/** 清空 AI魔改信息 */
|
/** 清空 AI魔改信息 */
|
||||||
clearCustomizeInfo() {
|
clearCustomizeInfo() {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
formData.append('visitRecordId', generateStore.visitRecordId + '')
|
formData.append('visitRecordId', generateStore.visitRecordId + '')
|
||||||
formData.append('file', fileData.file)
|
formData.append('file', fileData.file)
|
||||||
uploadCustomerPhoto(formData).then((res) => {
|
uploadCustomerPhoto(formData).then((res) => {
|
||||||
generateStore.updatePhotoInfo(res)
|
generateStore.updatePhotoInfo({...res, file: fileData.file})
|
||||||
generateStore.clearCustomizeInfo()
|
generateStore.clearCustomizeInfo()
|
||||||
router.push({ name: 'customize' })
|
router.push({ name: 'customize' })
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user