BUG 28002

This commit is contained in:
aixianling
2022-03-03 12:03:29 +08:00
parent 31935a80b9
commit 2fb2334e1d

View File

@@ -98,7 +98,7 @@ export default {
* */ * */
addOrUpdate(status) { addOrUpdate(status) {
if (Array.isArray(this.articInfo.thumbUrl)) { if (Array.isArray(this.articInfo.thumbUrl)) {
this.articInfo.thumbUrl = this.articInfo.thumbUrl[0].url this.articInfo.thumbUrl = this.articInfo.thumbUrl?.[0]?.url
} }
const msg = +status ? '发布成功' : this.isEdit ? '编辑成功' : '保存成功'; const msg = +status ? '发布成功' : this.isEdit ? '编辑成功' : '保存成功';
this.instance.post(`/app/appnews/addOrUpdate`, { this.instance.post(`/app/appnews/addOrUpdate`, {
@@ -135,7 +135,7 @@ export default {
} else { } else {
this.articInfo.thumbUrl = [] this.articInfo.thumbUrl = []
} }
} }
}) })
} }