diff --git a/project/xiushan/apps/AppNewsCenter/components/addArticle.vue b/project/xiushan/apps/AppNewsCenter/components/addArticle.vue index 03baa566..0de5085e 100644 --- a/project/xiushan/apps/AppNewsCenter/components/addArticle.vue +++ b/project/xiushan/apps/AppNewsCenter/components/addArticle.vue @@ -98,7 +98,7 @@ export default { * */ addOrUpdate(status) { 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 ? '编辑成功' : '保存成功'; this.instance.post(`/app/appnews/addOrUpdate`, { @@ -135,7 +135,7 @@ export default { } else { this.articInfo.thumbUrl = [] } - + } }) }