diff --git a/project/xiushan/apps/AppNewsCenter/components/addArticle.vue b/project/xiushan/apps/AppNewsCenter/components/addArticle.vue index fcf20aa0..03baa566 100644 --- a/project/xiushan/apps/AppNewsCenter/components/addArticle.vue +++ b/project/xiushan/apps/AppNewsCenter/components/addArticle.vue @@ -130,7 +130,12 @@ export default { this.articInfo.title = res.data.title; this.articInfo.content = res.data.content; this.articInfo.category = res.data.category - this.articInfo.thumbUrl = [{url: res.data.thumbUrl}] + if (res.data.thumbUrl) { + this.articInfo.thumbUrl = [{url: res.data.thumbUrl}] + } else { + this.articInfo.thumbUrl = [] + } + } }) } diff --git a/project/xiushan/apps/AppNewsCenter/components/addVideo.vue b/project/xiushan/apps/AppNewsCenter/components/addVideo.vue index fdf3c890..663b5f84 100644 --- a/project/xiushan/apps/AppNewsCenter/components/addVideo.vue +++ b/project/xiushan/apps/AppNewsCenter/components/addVideo.vue @@ -169,7 +169,11 @@ export default { this.newsInfo.description = res.data.description; this.newsInfo.category = res.data.category this.newsInfo.videoUrl = res.data.videoUrl; - this.newsInfo.thumbUrl = [{url: res.data.thumbUrl}]; + if (res.data.thumbUrl) { + this.newsInfo.thumbUrl = [{url: res.data.thumbUrl}] + } else { + this.newsInfo.thumbUrl = [] + } } }) }