From ca790b11ab4b61212f24f25688f9aa5311de2c87 Mon Sep 17 00:00:00 2001 From: xhhing <1370112271@qq.com> Date: Fri, 29 Nov 2024 14:40:52 +0800 Subject: [PATCH] update community page --- .../community/community/community.vue | 44 ++++++++++++++++--- .../community/community/scss/community.scss | 4 +- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/pages/homepages/community/community/community.vue b/pages/homepages/community/community/community.vue index f08d0f4..d6b9742 100644 --- a/pages/homepages/community/community/community.vue +++ b/pages/homepages/community/community/community.vue @@ -12,7 +12,12 @@ 搜索他人的健康秘诀 - + @@ -29,7 +34,7 @@ 2024年11月13日 - 今天去海边锻炼看见的,真是太美了 + 今天去海边锻炼看见的,真是太美了啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊 @@ -39,7 +44,12 @@ 10 - + 122 @@ -80,8 +90,32 @@ export default { ] }; }, - onLoad() { - + mounted(){ + this.getAllPost() + }, + methods:{ + getAllPost(){ + //TODO:获取所有的帖子 + const app = getApp() + uni.request({ + url:app.globalData.fit_journey_community_address + '/post/getAll', + method:"GET", + success:(res) => { + console.log('getAllPost') + console.log(res) + }, + fail: (err) => { + console.log('getAllPost fail') + console.log(err.log) + }, + }) + }, + likeClick(){ + //TODO:点赞 + }, + toAddPostPage(){ + //TODO:转到发布帖子界面 + } } } diff --git a/static/homepages/community/community/scss/community.scss b/static/homepages/community/community/scss/community.scss index 0a25913..c448b61 100644 --- a/static/homepages/community/community/scss/community.scss +++ b/static/homepages/community/community/scss/community.scss @@ -93,7 +93,9 @@ margin-bottom: 5vh; width: 100%; // height: 55vh; - height:900rpx; + display: flex; + flex-direction: column; + // height:900rpx; position: relative; .post_top_box{ display: flex;