微信小程序 “我的”界面
直接上图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/14708ddd9d6d47834e706d65ddbc3285.png)
WXML
<view>
<view class="userinfo">
<image class="userinfo-avatar" src="{{heads}}" background-size="cover"></image>
<text class="userinfo-nickname">{{nickname}}</text>
</view>
<view class="hr"></view>
<navigator url="../mypost/mypost?id={{openid}}" open-type="navigate">
<view class='item'>
<view class="title">我的东西</view>
<view class="detail2">
<text> ></text>
</view>
</view>
</navigator>
<navigator url="../mycollect/mycollect?id={{openid}}" open-type="navigate">
<view class="line"></view>
<view class="item">
<view class="title">我的收藏</view>
<view class="detail2">
<text> ></text>
</view>
</view>
</navigator>
<view class="line"></view>
<navigator url="../aboutus/aboutus" open-type="navigate">
<view class="item">
<view class="title">关与我们</view>
<view class="detail2">
<text> ></text>
</view>
</view>
</navigator>
<view class="line"></view>
</view>
WXSS
/* pages/mine/mine.wxss */
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
background: #eb6161;
width: 100%;
height: 300rpx;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: black;
}
.header {
margin: 90rpx 0 90rpx 50rpx;
border-bottom: 1px solid #ccc;
text-align: center;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
}
.header image {
width: 200rpx;
height: 200rpx;
}
.content {
margin-left: 50rpx;
margin-bottom: 90rpx;
}
.content text {
display: block;
color: #9d9d9d;
margin-top: 40rpx;
}
.bottom {
border-radius: 80rpx;
margin: 70rpx 50rpx;
font-size: 35rpx;
}
/* 用户中心 */
.hr {
width: 100%;
height: 15px;
background-color: #f4f5f6;
}
.item {
display: flex;
flex-direction: row;
}
.title {
padding-top: 15px;
padding-bottom: 15px;
padding-left: 15px;
font-size: 15px;
}
.detail2 {
font-size: 15px;
position: absolute;
right: 10px;
height: 50px;
line-height: 50px;
color: #888;
}
.line {
border: 1px solid #ccc;
opacity: 0.2;
}