From 8005d5186a3531e1f3e53cfc1d7535d779b408ce Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Fri, 2 Dec 2022 10:54:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=93=E9=A2=98=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=EF=BC=88=E5=8E=9F=E5=B1=85=E6=B0=91=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E6=94=B9=E5=90=8D=EF=BC=89=E3=80=81?= =?UTF-8?q?=E4=B9=A1=E6=9D=91=E7=9B=B8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppEnteringCommunity.vue | 142 +++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/src/project/pingchang/AppEnteringCommunity/AppEnteringCommunity.vue b/src/project/pingchang/AppEnteringCommunity/AppEnteringCommunity.vue index d946a72..bec2492 100644 --- a/src/project/pingchang/AppEnteringCommunity/AppEnteringCommunity.vue +++ b/src/project/pingchang/AppEnteringCommunity/AppEnteringCommunity.vue @@ -65,6 +65,43 @@ +
+ 专题活动 +
+ 更多活动 + +
+
+ +
+ +
+ {{ item.title }} +
+
+ +
+
+ 乡村相册 +
+
+
+ +
共{{ item.total }}张
+
{{ item.name }}
+
+ +
@@ -83,6 +120,8 @@ export default { areaName: '', areaId: '', $areaId: '', + albumList: [], + activityList: [], publicList: [], moduleId: "", isInit: false @@ -97,6 +136,11 @@ export default { this.$nextTick(() => { this.getName() + this.getAlbumList() + this.getActiveList() + }) + uni.$on('update', () => { + this.getAlbumList() }) }, @@ -165,7 +209,8 @@ export default { getPublicList() { this.$instance.post("/app/appcontentinfo/list", null, { - params: {moduleId: this.moduleId, size: 3, areaId: this.areaId} + params: { + moduleId: this.moduleId, size: 3, areaId: this.areaId} }).then(res => { if (res?.data) { this.publicList = res.data.records; @@ -198,11 +243,45 @@ export default { this.newsList = [] this.$nextTick(() => { + this.getActiveList() + this.getAlbumList() this.getPublicList() uni.setStorageSync('areaId', this.areaId) uni.setStorageSync('areaName', this.areaName) }) }, + + getAlbumList() { + this.$instance.post(`/app/appvillagepicturealbum/queryAlbumMenu?areaId=${this.areaId}`).then(res => { + if (res.code == 0) { + this.albumList = res.data.map(v => { + return { + ...v, + coverImg: `${this.$cdn}/dvcp/album/album${v.type}.png` + } + }) + } + }) + }, + + getActiveList() { + this.$instance.post(`/app/appvillageactivityinfo/listUp`, null, { + params: { + current: 1, + size: 6, + areaId: this.areaId + } + }).then(res => { + if (res.code == 0) { + this.activityList = res.data.records.map(v => { + return { + ...v, + url: v.url ? JSON.parse(v.url)[0].url : '' + } + }) + } + }) + } }, onShareAppMessage() { @@ -391,6 +470,67 @@ export default { } } + .album-list { + box-sizing: border-box; + padding: 0 32px 32px; + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 16px; + + .album { + position: relative; + width: 218px; + height: 240px; + background: #FFFFFF; + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02); + border-radius: 16px; + overflow: hidden; + + image { + position: absolute; + left: 0; + top: 0; + z-index: 1; + width: 100%; + height: 100%; + } + + .total { + display: flex; + position: absolute; + align-items: center; + justify-content: center; + right: 8px; + top: 8px; + z-index: 2; + width: 74px; + height: 40px; + background: rgba(0, 0, 0, .6); + border-radius: 8px; + font-size: 22px; + font-weight: 400; + color: #FFFFFF; + } + + .desc { + position: absolute; + bottom: 16px; + left: 0; + z-index: 2; + width: 100%; + height: 40px; + line-height: 40px; + padding: 0 12px; + font-size: 32px; + text-align: center; + color: #FFFFFF; + font-weight: 600; + box-sizing: border-box; + } + } + } + .list-news { box-sizing: border-box; padding: 0 32px;