代码格式化

This commit is contained in:
linfeng 2022-09-19 16:51:53 +08:00
parent c8fa1fc36f
commit 0f654e23bb
8 changed files with 242 additions and 230 deletions

View File

@ -24,7 +24,6 @@
</script>
<style lang="scss" scoped>
.add-post {
position: fixed;
right: 20rpx;

View File

@ -5,7 +5,8 @@
<view class="post-item">
<view class="post-list-item">
<view @click.stop="toUser(item.uid)">
<u-avatar class="avatar" :src="item.userInfo.avatar" :show-level='item.userInfo.type == 1' level-bg-color="#000000"></u-avatar>
<u-avatar class="avatar" :src="item.userInfo.avatar" :show-level='item.userInfo.type == 1'
level-bg-color="#000000"></u-avatar>
</view>
<view class="center">
<view style="display: flex;align-items: center;">
@ -255,6 +256,7 @@
.post-list-item {
display: flex;
align-items: center;
.avatar {
width: 85rpx;
height: 85rpx;
@ -268,6 +270,7 @@
flex-direction: column;
font-size: 24rpx;
color: #999;
.username {
font-size: 32rpx;
font-weight: 600;
@ -283,6 +286,7 @@
border-radius: 10rpx;
margin-right: 10rpx;
}
.officials {
display: inline-block;
font-size: 25rpx;
@ -293,8 +297,10 @@
margin-left: 30rpx;
}
}
.right {
height: 85rpx;
.arrow-down {
color: #999;
}
@ -330,9 +336,4 @@
display: none !important;
}
}
</style>

View File

@ -8,15 +8,22 @@
<text v-if="item.gender == 1" class="iconfont icon-nan"></text>
<text v-if="item.gender == 2" class="iconfont icon-nv"></text>
</view>
<u-button @click="follow(index, item.uid)" v-if="item.hasFollow === 0" class="btn-gz" type="default" size="mini">关注</u-button>
<u-button @click="cancelFollow(index, item.uid)" v-if="item.hasFollow === 1" class="btn-gz" type="default" size="mini" plain>互相关注</u-button>
<u-button @click="cancelFollow(index, item.uid)" v-if="item.hasFollow === 2" class="btn-gz" type="default" size="mini" plain>已关注</u-button>
<u-button @click="follow(index, item.uid)" v-if="item.hasFollow === 0" class="btn-gz" type="default"
size="mini">关注</u-button>
<u-button @click="cancelFollow(index, item.uid)" v-if="item.hasFollow === 1" class="btn-gz"
type="default" size="mini" plain>互相关注</u-button>
<u-button @click="cancelFollow(index, item.uid)" v-if="item.hasFollow === 2" class="btn-gz"
type="default" size="mini" plain>已关注</u-button>
</navigator>
</block>
<!-- 加载状态 -->
<block v-if="loadStatus != 'none'">
<block v-if="list.length === 0 && loadStatus == 'nomore'"><u-empty margin-top="100" text="暂无用户" mode="favor"></u-empty></block>
<block v-else><u-loadmore margin-bottom="50" margin-top="50" :status="loadStatus" /></block>
<block v-if="list.length === 0 && loadStatus == 'nomore'">
<u-empty margin-top="100" text="暂无用户" mode="favor"></u-empty>
</block>
<block v-else>
<u-loadmore margin-bottom="50" margin-top="50" :status="loadStatus" />
</block>
</block>
</view>
</template>
@ -71,6 +78,7 @@ export default {
padding: 20rpx;
border-bottom: 1px solid #f5f5f5;
background-color: #ffffff;
&:last-child {
border-bottom: 0;
}
@ -96,14 +104,17 @@ export default {
.user-list-item .user .iconfont {
font-size: 12px;
}
/* #ifdef H5 */
.user-list-item .btn-gz {
margin-right: 20rpx;
}
/* #endif */
/* #ifdef MP */
.user-list-item .btn-gz {
margin-left: auto;
}
/* #endif */
</style>

View File

@ -1,9 +1,9 @@
<template>
<view class="container">
<view class="title">选择圈子类目</view>
<view class="class-wrap">
<view class="class-item u-line-1" @click="chooseClass(item.cateId,item.cateName)" v-for="(item, index) in classList" :key="index">{{ item.cateName }}</view>
<view class="class-item u-line-1" @click="chooseClass(item.cateId,item.cateName)"
v-for="(item, index) in classList" :key="index">{{ item.cateName }}</view>
</view>
</view>
</template>
@ -44,6 +44,7 @@ export default {
.title {
margin-bottom: 30rpx;
}
.class-wrap {
.class-item {
width: 30%;
@ -55,6 +56,7 @@ export default {
text-align: center;
margin-bottom: 20rpx;
border-radius: 10rpx;
&:nth-child(3n + 2) {
margin-left: 5%;
margin-right: 5%;
@ -67,4 +69,3 @@ export default {
}
}
</style>