From 66093030c2946cdaa7e0d600f7b2cbd91b4891f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=BB=95=E4=BC=9F?= <499672082@qq.com> Date: Wed, 2 Mar 2022 17:43:28 +0800 Subject: [PATCH] 27979 --- .../xiushan/apps/AppNewsCenter/components/addArticle.vue | 7 ++++++- project/xiushan/apps/AppNewsCenter/components/addVideo.vue | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) 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 = [] + } } }) }