Files
barter-app/pages/user/index.vue
2021-07-27 17:35:15 +08:00

163 lines
3.5 KiB
Vue

<template>
<view>
<!-- 用户信息 -->
<view class="user">
<view class="user-content">
<view class="user-info">
<image class="info-cover" src="../../static/dev/good_cover_00.jpg" mode="aspectFill"></image>
<view class="info-nickname">唐明明</view>
<view class="info-tags">
<text class="info-tags-item">企业认证</text>
<text class="info-tags-item">SSS企业主</text>
</view>
</view>
<view class="user-sign">签到</view>
</view>
<view class="user-total">
<view class="total-item">
<view class="total-number">0</view>
<view class="total-text">商品收藏</view>
</view>
<view class="total-item">
<view class="total-number">0</view>
<view class="total-text">店铺收藏</view>
</view>
<view class="total-item">
<view class="total-number">0</view>
<view class="total-text">浏览记录</view>
</view>
<view class="total-item">
<view class="total-number">0</view>
<view class="total-text">优惠券</view>
</view>
</view>
<view class="user-vip">
<view class="vip-text">开通会员获得更多的权益</view>
<view class="vip-btn">立即开通</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
// 用户
.user{
background: #f3f4f8;
@extend .ios-top;
.user-content{
padding: ($padding*3) $padding 0;
display: flex;
justify-content: space-between;
align-items: center;
.user-info{
position: relative;
width: 80%;
padding-left: $padding + 88;
height: 98rpx;
box-sizing: border-box;
.info-cover{
position: absolute;
left: 0;
top: 0;
vertical-align: top;
height: 98rpx;
width: 98rpx;
border-radius: 50%;
}
.info-nickname{
line-height: 55rpx;
font-size: $title-size + 4;
font-weight: bold;
}
.info-tags{
font-size: $title-size-sm - 4;
.info-tags-item{
background: #333333;
margin-right: $margin/2;
color: #e9dabb;
padding: 0 ($padding/2);
border-radius: 20rpx;
line-height: 40rpx;
display: inline-block;
}
}
}
.user-sign{
background: white;
width: 130rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: $title-size-m;
}
}
.user-total{
padding: $padding ($padding - 10);
display: flex;
.total-item{
position: relative;
margin: 0 ($margin/3);
text-align: center;
width: calc(25% - #{$margin - 10});
.total-number{
font-size: $title-size;
font-weight: bold;
line-height: 50rpx;
}
.total-text{
font-size: $title-size-sm;
line-height: 40rpx;
}
&::before{
position: absolute;
right: -($margin/3);
top: 25%;
height: 50%;
content: " ";
width: 1rpx;
background: #c2c4c1;
}
&:last-child::before{
display: none;
}
}
}
.user-vip{
display: flex;
justify-content: space-between;
background: #333333;
margin: 0 $margin;
border-radius: $radius $radius 0 0;
padding: $padding;
.vip-text{
line-height: 50rpx;
width: calc(100% - 180rpx);
color: #e9dabb;
font-size: $title-size-m;
}
.vip-btn{
background-color: #e9dabb;
color: #333333;
line-height: 50rpx;
width: 160rpx;
text-align: center;
border-radius: 25rpx;
font-size: $title-size-sm;
}
}
}
</style>