diff --git a/pages.json b/pages.json index 45ba06f..a12fd74 100644 --- a/pages.json +++ b/pages.json @@ -517,6 +517,13 @@ "navigationStyle": "custom" } }, + { + "path": "pages/homepages/community/add_post/add_post", + "style" : + { + "navigationStyle": "custom" + } + }, { "path": "pages/homepages/community/personal_center/personal_center", "style" : diff --git a/pages/homepages/community/add_post/add_post.vue b/pages/homepages/community/add_post/add_post.vue new file mode 100644 index 0000000..b60eef0 --- /dev/null +++ b/pages/homepages/community/add_post/add_post.vue @@ -0,0 +1,112 @@ + + + + + \ No newline at end of file diff --git a/pages/homepages/community/community/community.vue b/pages/homepages/community/community/community.vue index 31a8a60..6f14654 100644 --- a/pages/homepages/community/community/community.vue +++ b/pages/homepages/community/community/community.vue @@ -161,10 +161,20 @@ export default { }, likeClick(index){ //TODO:点赞 - this.posts[index].islike = this.posts[index].islike ? false:true + if (this.posts[index].islike){ + this.posts[index].islike = false + this.posts[index].like_num-- + } + else{ + this.posts[index].islike = true + this.posts[index].like_num++ + } }, toAddPostPage(){ //TODO:转到发布帖子界面 + uni.navigateTo({ + url:'/pages/homepages/community/add_post/add_post' + }) } } } diff --git a/static/homepages/community/add_post/pictures/add_post_image.png b/static/homepages/community/add_post/pictures/add_post_image.png new file mode 100644 index 0000000..9634891 Binary files /dev/null and b/static/homepages/community/add_post/pictures/add_post_image.png differ diff --git a/static/homepages/community/add_post/pictures/left_arrow.png b/static/homepages/community/add_post/pictures/left_arrow.png new file mode 100644 index 0000000..522c772 Binary files /dev/null and b/static/homepages/community/add_post/pictures/left_arrow.png differ diff --git a/static/homepages/community/add_post/scss/add_post.scss b/static/homepages/community/add_post/scss/add_post.scss new file mode 100644 index 0000000..269c180 --- /dev/null +++ b/static/homepages/community/add_post/scss/add_post.scss @@ -0,0 +1,169 @@ +.add_post_box{ + height: 100vh; + width: 100vw; + position: relative; + .addpost_top_box{ + display: flex; + align-items: center; + // background-color: #55aaff; + height: 10vh; + width: 100%; + position: absolute; + top: 5%; + .return_box{ + display: flex; + justify-content: center; + align-items: center; + background-color: #E6EEFA; + height: 5.5vh; + width: 5.5vh; + border-radius: 50%; + position: absolute; + left: 5vw; + .return_image{ + width: 3vh; + } + } + .title_box{ + font-family: 'Poppins'; + font-style: normal; + font-weight: 550; + font-size: 2.8vh; + width: fit-content; + // line-height: 33px; + /* or 92% */ + text-align: center; + letter-spacing: -0.604677px; + color: #000000; + position: absolute; + left: 50%; + transform: translateX(-50%); + } + .publish_btn{ + position: absolute; + right: 5vw; + display: flex; + justify-content: center; + align-items: center; + background: #5790DF; + box-shadow: 0px 14.8205px 29.641px rgba(87, 144, 223, 0.5); + border-radius: 20px; + padding: 1vh 2vh; + font-family: 'Poppins'; + font-style: normal; + font-weight: 500; + font-size: 1.5vh; + text-align: center; + letter-spacing: -0.604677px; + color: #FFFFFF; + } + } + .addpost_tip_box{ + position: absolute; + top: 15vh; + left: 50%; + transform: translateX(-50%); + width: 80%; + text-align: center; + font-family: 'Poppins'; + font-style: normal; + font-weight: 600; + font-size: 1.9vh; + letter-spacing: -0.604677px; + color: #CCB8B8; + padding-bottom: 1vh; + border-bottom: 1px solid #000000; + } + .addpost_box{ + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 25vh; + width: 90%; + .post_box{ + background-color: #B2CBF0; + border-radius: 30px; + padding: 5vh 2vh; + box-sizing: border-box; + margin-bottom: 5vh; + width: 100%; + display: flex; + flex-direction: column; + position: relative; + } + .post_top_box{ + display: flex; + .post_avatar_box{ + width: 5vh; + height: 5vh; + border-radius: 50%; + background-color: #fff; + display: flex; + justify-content: center; + align-items: center; + margin-right: 2vh; + .post_avatar{ + width: 80%; + } + } + .post_info{ + font-family: 'Poppins'; + font-style: normal; + font-weight: 700; + font-size: 2vh; + color: #000000; + display: flex; + flex-direction: column; + justify-content: center; + } + } + .post_word_box{ + font-family: 'Poppins'; + font-style: normal; + font-weight: 700; + font-size: 2vh; + color: #000000; + margin-top: 2.5vh; + background-color: #E6EEFA; + border-radius: 8px; + box-sizing: border-box; + padding: 1.5vh 1.5vh; + height: 5.5vh; + width:100%; + letter-spacing: 1px; + } + .post_images_box{ + width: 100%; + height:70%; + // .post_images{ + // width: 100%; + // height: 100%; + // } + .myimgDV { + width: 100%; + height: 100%; + .flex { + display: flex; + } + .justify { + justify-content: space-between; + } + .receiveimage { + margin-top: 28rpx; + display: flex; + flex-wrap: wrap; + width: 100%; + .doublepic { + // height: 100%; + width: 49%; + margin-right: 12rpx; + margin-bottom: 12rpx; + &:nth-child(2n) { + margin-right: 0; + } + } + } + } + } + } +} \ No newline at end of file