From 0b9928e1e0f8c58270ea6ae68e5937b08d52110e Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Thu, 6 Apr 2023 10:56:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E9=80=89=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppNewFarmerBank/AppNewFarmerBank.vue | 75 ++++++++++--- .../fengdu/AppNewFarmerBank/handpick.vue | 101 +++++++++++++++--- .../fengdu/AppNewFarmerBank/pickDetail.vue | 32 +++--- 3 files changed, 165 insertions(+), 43 deletions(-) diff --git a/src/project/fengdu/AppNewFarmerBank/AppNewFarmerBank.vue b/src/project/fengdu/AppNewFarmerBank/AppNewFarmerBank.vue index 800eaac..e8fb948 100644 --- a/src/project/fengdu/AppNewFarmerBank/AppNewFarmerBank.vue +++ b/src/project/fengdu/AppNewFarmerBank/AppNewFarmerBank.vue @@ -33,23 +33,27 @@

精选动态

-
+
更多
-
+
-
百年征和波澜壮阔,百年初心历争议弥坚。7月1日上午,庆祝中国共产党成立100周年…
-
- - - 99+ +
{{ item.content }}
+
+ +
+ {{ item.upCount || 0 }}+ +
-
- +
+ +
+
+
@@ -68,6 +72,8 @@ export default { status: null, current: 1, list: [], + allList: [], + flag: false, } }, computed: { @@ -79,16 +85,45 @@ export default { params: { moduleId: moduleId, current: this.current, - // areaId: this.user.areaId + areaId: this.user.areaId, + containContent: true, } }).then(res=> { if(res?.data) { - this.list = res.data.records.length > 3 ? res.data.records.slice(2) : res.data.records + this.allList = res.data.records + let newList = res.data.records.length > 3 ? res.data.records.slice(0,3) : res.data.records + let mapList = newList.map(e=> { + return { + ...e, + images: e?.files.filter(i=> i.name.split('.')[1]=='jpeg') || e?.files.filter(i => i.name.split('.')[1] == 'jpg') || e?.files.filter(i => i.name.split('.')[1] == 'png') || [], + videos: e?.files.filter(i => i.name.split('.')[1] == 'mp4') || [], + } + }) + this.list = mapList.map(v=> { + return { + ...v, + images: v.images.length > 3? v.images.slice(0, 3) : v.images, + videos: v.videos.length > 3? v.videos.slice(0, 3) : v.videos, + upStatus: 0 + } + }) } }) }, handleBannerClick() { + }, + // 点赞 + upCount(id,index) { + if (this.flag) return + + this.flag = true + this.$instance.post(`/app/appcontentinfo/supportById?id=${id}`).then(res=> { + if(res?.code==0) { + this.list[index].upStatus = 1 + this.$u.toast(`点赞成功`) + } + }) }, toPages(url,status) { if(!this.user.idNumber) { @@ -282,10 +317,20 @@ export default { } } } - .bottom { - img { - width: 100%; - height: 202px; + .imgs { + display: flex; + flex-wrap: wrap; + background: #FFF; + + image, + video { + width: 200px; + height: 200px; + margin: 0 12px 0 0; + } + image:nth-child(3n + 0), + video:nth-child(3n + 0) { + margin: 0; } } } diff --git a/src/project/fengdu/AppNewFarmerBank/handpick.vue b/src/project/fengdu/AppNewFarmerBank/handpick.vue index 2876cfc..587d82f 100644 --- a/src/project/fengdu/AppNewFarmerBank/handpick.vue +++ b/src/project/fengdu/AppNewFarmerBank/handpick.vue @@ -1,35 +1,93 @@ @@ -68,12 +76,12 @@ export default { font-weight: 400; color: #333333; background: #FFF; + padding: 0; } .imgs { display: flex; flex-wrap: wrap; - padding: 20px 32px; - box-sizing: border-box; + margin-top: 24px; background: #FFF; image,