From d3957be37983c501186aacd8aa497dd1f09aef8c Mon Sep 17 00:00:00 2001 From: linxi Date: Fri, 15 Nov 2024 10:39:59 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=E5=9C=B0=E6=A0=87=E5=A5=BD=E7=89=A9?= =?UTF-8?q?=EF=BC=88=E6=9C=8D=E5=8A=A1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/components/culture.vue | 44 +++++++++++-- pages/home/components/goods.vue | 15 +++++ pages/home/components/information.vue | 41 +++++++++--- pages/home/components/policy.vue | 52 +++++++++++---- pages/home/components/projects.vue | 7 +- pages/home/components/recommend.vue | 43 ++++++++++--- pages/home/components/serviec.vue | 93 +++++++++++++++++++++++++-- pages/home/landMark.vue | 14 ++-- 8 files changed, 258 insertions(+), 51 deletions(-) diff --git a/pages/home/components/culture.vue b/pages/home/components/culture.vue index d1381f6..03bef8b 100644 --- a/pages/home/components/culture.vue +++ b/pages/home/components/culture.vue @@ -1,7 +1,17 @@ @@ -31,8 +54,17 @@ export default { padding: 20rpx; } .img-item{ + width: 340rpx; height: 320rpx; - background: rgba(137,35,35,0.39); border-radius: 16rpx; } +.img-nodata { + position: relative; + top: 0; + left: 50%; + transform: translate(-50%, 0); + width: 352rpx; + height: 338rpx; + margin-bottom: 60rpx; +} \ No newline at end of file diff --git a/pages/home/components/goods.vue b/pages/home/components/goods.vue index 918f020..c0e4f62 100644 --- a/pages/home/components/goods.vue +++ b/pages/home/components/goods.vue @@ -27,6 +27,12 @@ + @@ -53,6 +59,15 @@ export default { diff --git a/pages/home/components/policy.vue b/pages/home/components/policy.vue index 459b2c0..ec3a4be 100644 --- a/pages/home/components/policy.vue +++ b/pages/home/components/policy.vue @@ -13,6 +13,12 @@ + @@ -26,27 +32,38 @@ export default { }, data() { return { + webUrl: this.$VUE_APP_RESOURCES_URL, list: [], currentList: [], isMore: false } }, - mounted() { - const params = { - landmarkDataId: this.landmarkDataId, - page: 1, - limit: 99999 - } - getPorjectPolicyFiles(params).then(res => { - this.list = res.data.records - if(this.isMore) { - this.currentList = this.list - } else { - this.currentList = this.list.filter((item, index) => index < 3) + watch: { + landmarkDataId(value) { + if(value) { + this.getData() } - }) + } + }, + mounted() { + this.getData() }, methods: { + getData() { + const params = { + landmarkDataId: this.landmarkDataId, + page: 1, + limit: 99999 + } + getPorjectPolicyFiles(params).then(res => { + this.list = res.data.records + if(this.isMore) { + this.currentList = this.list + } else { + this.currentList = this.list.filter((item, index) => index < 3) + } + }) + }, showMore() { this.isMore = !this.isMore if(this.isMore) { @@ -131,4 +148,13 @@ export default { padding: 5rpx 20rpx; border-radius: 30rpx; } +.img-nodata { + position: relative; + top: 0; + left: 50%; + transform: translate(-50%, 0); + width: 352rpx; + height: 338rpx; + margin-bottom: 60rpx; +} \ No newline at end of file diff --git a/pages/home/components/projects.vue b/pages/home/components/projects.vue index 12433e3..5c18d28 100644 --- a/pages/home/components/projects.vue +++ b/pages/home/components/projects.vue @@ -30,7 +30,7 @@ > - + @@ -46,7 +46,10 @@ export default { serviec }, props: { - landmarkDataId: null + landmarkDataId: null, + info: { + default:() => {} + } }, data() { return { diff --git a/pages/home/components/recommend.vue b/pages/home/components/recommend.vue index 6ddab86..a49931f 100644 --- a/pages/home/components/recommend.vue +++ b/pages/home/components/recommend.vue @@ -18,6 +18,12 @@ + @@ -31,22 +37,34 @@ export default { }, data() { return { + webUrl: this.$VUE_APP_RESOURCES_URL, list: [], currentList: [], isMore: false } }, - mounted() { - getPorjectRecommend({landmarkDataId: this.landmarkDataId}).then(res => { - this.list = res.data - if(this.isMore) { - this.currentList = this.list - } else { - this.currentList = this.list.filter((item, index) => index < 3) + watch: { + landmarkDataId(value) { + if(value) { + this.getData() } - }) + } }, + mounted() { + this.getData() + }, + methods: { + getData() { + getPorjectRecommend({landmarkDataId: this.landmarkDataId}).then(res => { + this.list = res.data + if(this.isMore) { + this.currentList = this.list + } else { + this.currentList = this.list.filter((item, index) => index < 3) + } + }) + }, toStore(id) { if (!id) { return @@ -131,4 +149,13 @@ export default { padding: 5rpx 20rpx; border-radius: 30rpx; } +.img-nodata { + position: relative; + top: 0; + left: 50%; + transform: translate(-50%, 0); + width: 352rpx; + height: 338rpx; + margin-bottom: 60rpx; +} \ No newline at end of file diff --git a/pages/home/components/serviec.vue b/pages/home/components/serviec.vue index ef990df..03aea6f 100644 --- a/pages/home/components/serviec.vue +++ b/pages/home/components/serviec.vue @@ -1,17 +1,100 @@ - \ No newline at end of file diff --git a/pages/home/landMark.vue b/pages/home/landMark.vue index 27693d5..f923a5a 100644 --- a/pages/home/landMark.vue +++ b/pages/home/landMark.vue @@ -46,7 +46,7 @@ - + @@ -62,13 +62,8 @@ mode="widthFix" class="loadend" /> - - + + @@ -153,13 +148,14 @@ export default { this.page = 1 this.goods = [] this.isCompleteLoadGood = false + this.actived = 1 this.getMap() this.fetchGoods() }, getMap() { const id = this.navList[this.navIndex]['id'] getProvince(id).then(({data}) => { - this.mapData = data + this.mapData = data || {} this.isLoad = true }) },