diff --git a/pages/home/components/culture.vue b/pages/home/components/culture.vue index 6494e8b..c9e8a5a 100644 --- a/pages/home/components/culture.vue +++ b/pages/home/components/culture.vue @@ -47,7 +47,7 @@ export default { }, getData() { getCulture({landmarkDataId: this.landmarkDataId}).then(res => { - this.list = res.data.cultureImages + this.list = res.data.cultureImages || [] }) } } diff --git a/pages/home/components/information.vue b/pages/home/components/information.vue index 9f3c562..577f2c6 100644 --- a/pages/home/components/information.vue +++ b/pages/home/components/information.vue @@ -122,7 +122,7 @@ export default { limit: 9999 } getNews(params).then(res => { - this.infoArray = res.data.records + this.infoArray = res.data.records || [] }) }, likeInfoItemHandle(item, index, value, voValue) { diff --git a/pages/home/components/policy.vue b/pages/home/components/policy.vue index 241ca92..ea4b05b 100644 --- a/pages/home/components/policy.vue +++ b/pages/home/components/policy.vue @@ -56,7 +56,7 @@ export default { limit: 99999 } getPorjectPolicyFiles(params).then(res => { - this.list = res.data.records + this.list = res.data.records || [] if(this.isMore) { this.currentList = this.list } else { diff --git a/pages/home/components/recommend.vue b/pages/home/components/recommend.vue index 4c00bea..a9eeb60 100644 --- a/pages/home/components/recommend.vue +++ b/pages/home/components/recommend.vue @@ -57,7 +57,7 @@ export default { methods: { getData() { getPorjectRecommend({landmarkDataId: this.landmarkDataId}).then(res => { - this.list = res.data + this.list = res.data || [] if(this.isMore) { this.currentList = this.list } else {