Fixed add photo error.

pull/9/head
ruibaby 6 years ago
parent 7e2bd70794
commit 0e4a4e104f

@ -322,10 +322,12 @@ export default {
if (this.photo.id) {
photoApi.update(this.photo.id, this.photo).then(response => {
this.$message.success('照片更新成功')
this.loadPhotos()
})
} else {
photoApi.create(this.photo).then(response => {
this.$message.success('照片添加成功')
this.loadPhotos()
this.photo = response.data.data
})
}

Loading…
Cancel
Save