发帖达人模块优化

This commit is contained in:
linfeng 2023-11-20 09:33:28 +08:00
parent 218fa38483
commit c179fe03c5
2 changed files with 31 additions and 14 deletions
src/main/resources/static/linfeng-community-uniapp-ky

@ -59,7 +59,7 @@
"path" : "pages/post/add", "path" : "pages/post/add",
"style" : "style" :
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "正在发帖",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }

@ -24,14 +24,15 @@
<view v-show="pageCurrent == 1"> <view v-show="pageCurrent == 1">
<navigator :url="'/pages/user/home?uid=' + item.uid" class="user-item" hover-class="none" <navigator :url="'/pages/user/home?uid=' + item.uid" class="user-item" hover-class="none"
v-for="(item, index) in userList" :key="index"> v-for="(item, index) in userList" :key="index">
<view v-if="index < 10" class="user-index-hot">{{ index + 1 }}</view> <view v-if="index < 3" class="user-index-hot">{{ index + 1 }}</view>
<view v-else class="user-index">{{ index + 1 }}</view> <view v-else class="user-index-common">{{ index + 1 }}</view>
<image class="avatar" mode="aspectFill" :src="item.avatar"></image> <image class="avatar" mode="aspectFill" :src="item.avatar"></image>
<view class="right"> <view class="right">
<text class="username">{{ item.username }}</text> <text class="username">{{ item.username }}</text>
<view class="tag-wrap"> <view class="tag-wrap">
<text class="tag" :key="index2">{{ item.intro }}</text> <text class="tag" :key="index2">{{ item.intro }}</text>
<text class="tag" :key="index2">+{{ item.postNumber }}</text> <text class="post-num" :key="index2">+{{ item.postNumber }}</text>
</view> </view>
</view> </view>
</navigator> </navigator>
@ -187,7 +188,7 @@
border-bottom: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;
.user-index-hot { .user-index-hot {
margin-right: 20rpx; margin: 20rpx 20rpx 0rpx 0rpx;
color: #fff; color: #fff;
background-image: linear-gradient(#e64340, #ffaac3); background-image: linear-gradient(#e64340, #ffaac3);
width: 55rpx; width: 55rpx;
@ -196,6 +197,17 @@
text-align: center; text-align: center;
line-height: 55rpx; line-height: 55rpx;
} }
.user-index-common {
margin: 20rpx 20rpx 0rpx 0rpx;
color: #fff;
background-image: linear-gradient(#000000, #949494);
width: 55rpx;
height: 55rpx;
border-radius: 50%;
text-align: center;
line-height: 55rpx;
}
.user-index { .user-index {
margin-right: 20rpx; margin-right: 20rpx;
@ -221,20 +233,25 @@
} }
.tag-wrap { .tag-wrap {
font-size: 20rpx; font-size: 24rpx;
.tag { .tag {
display: inline-block; display: inline-block;
padding: 5rpx 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
margin-right: 20rpx; margin-right: 20rpx;
margin-bottom: 20rpx; margin-top: 40rpx;
background-color: #7da9bd; color: #a3a3a3;
font-size: 22rpx;
&:nth-child(2n) { }
background-color: #ccb3ff;
} .post-num{
display: inline-block;
border-radius: 10rpx;
margin-right: 20rpx;
margin-top: 40rpx;
color: #aaaaff;
font-size: 34rpx;
font-weight: 800;
} }
} }
} }