1
This commit is contained in:
@@ -39,8 +39,8 @@
|
||||
if (fileData.id) return router.push({ name: 'customize' })
|
||||
if (!fileData.file) return
|
||||
const formData = new FormData()
|
||||
formData.append('customerId', '1')
|
||||
formData.append('visitRecordId', '1')
|
||||
formData.append('customerId', generateStore.customerId + '')
|
||||
formData.append('visitRecordId', generateStore.visitRecordId + '')
|
||||
formData.append('file', fileData.file)
|
||||
uploadCustomerPhoto(formData).then((res) => {
|
||||
generateStore.updatePhotoInfo(res)
|
||||
@@ -48,6 +48,10 @@
|
||||
router.push({ name: 'customize' })
|
||||
})
|
||||
}
|
||||
// 处理照片加载错误
|
||||
const pictureLoadError = (e: any) => {
|
||||
// generateStore.updatePhotoInfo({})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -62,7 +66,7 @@
|
||||
</div>
|
||||
<!-- 照片 -->
|
||||
<div class="picture" v-if="fileData.url">
|
||||
<img :src="fileData.url" />
|
||||
<img :src="fileData.url" @error="pictureLoadError" />
|
||||
</div>
|
||||
<div class="btns">
|
||||
<template v-if="fileData.url">
|
||||
|
||||
Reference in New Issue
Block a user