Fixed add photo error.

pull/3445/head
ruibaby 2019-05-09 21:15:27 +08:00
parent 7e2bd70794
commit 0e4a4e104f
1 changed files with 2 additions and 0 deletions

View File

@ -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
})
}