爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

155 lines
4.3 KiB

<template>
<view class="profit-detail-container">
<!-- 顶部导航栏 -->
<view class="nav-bar">
<view class="back" @tap="goBack">
<uni-icons type="left" size="20"></uni-icons>
</view>
<text class="title">收益明细</text>
</view>
<view class="main-content">
<view class="profit-list-card">
<view class="profit-item" v-for="(item, idx) in profits" :key="idx">
<image class="avatar" :src="item.avatar" mode="aspectFill" />
<view class="profit-info">
<view class="profit-name-date">
<view class="profit-name">{{ item.name }}</view>
<view class="profit-date">{{ item.date }}</view>
</view>
</view>
<view class="profit-type">{{ item.type }}</view>
<text class="profit-amount">+¥{{ item.amount }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
profits: [
{ avatar: 'https://randomuser.me/api/portraits/men/1.jpg', name: '李世海', date: '04-27', type: '用户下单', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/women/2.jpg', name: '周静', date: '04-27', type: '拉新', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/women/3.jpg', name: '周海', date: '04-27', type: '拉新', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/4.jpg', name: '冯启彬', date: '04-27', type: '拉新', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/5.jpg', name: '李娟', date: '04-27', type: '用户下单', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/6.jpg', name: '李书琪', date: '04-27', type: '用户下单', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/7.jpg', name: '赵香光', date: '04-27', type: '用户下单', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/4.jpg', name: '冯启彬', date: '04-27', type: '拉新', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/5.jpg', name: '李娟', date: '04-27', type: '用户下单', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/6.jpg', name: '李书琪', date: '04-27', type: '用户下单', amount: 10 },
{ avatar: 'https://randomuser.me/api/portraits/men/7.jpg', name: '赵香光', date: '04-27', type: '用户下单', amount: 10 },
]
}
},
methods: {
goBack() {
uni.navigateBack();
}
}
}
</script>
<style lang="scss" scoped>
.profit-detail-container {
min-height: 100vh;
background: #f7f7f7;
}
.nav-bar {
display: flex;
align-items: center;
height: calc(150rpx + var(--status-bar-height));
padding: 0 32rpx;
padding-top: var(--status-bar-height);
background: #fff;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
box-sizing: border-box;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.03);
.back {
padding: 20rpx;
margin-left: -20rpx;
}
.title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: 500;
color: #222;
}
}
.main-content {
margin-top: calc(150rpx + var(--status-bar-height));
margin-bottom: 40rpx;
}
.profit-list-card {
background: #fff;
border-radius: 40rpx;
margin: 0 32rpx 32rpx 32rpx;
padding: 0 0 0 0;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.03);
}
.profit-item {
display: flex;
align-items: center;
justify-content: flex-start;
padding: 28rpx 36rpx 28rpx 36rpx;
border-bottom: 2rpx solid #f3f3f3;
&:last-child {
border-bottom: none;
}
}
.avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 24rpx;
object-fit: cover;
background: #f5f5f5;
}
.profit-info {
display: flex;
flex-direction: column;
justify-content: center;
min-width: 120rpx;
}
.profit-name-date {
display: flex;
flex-direction: column;
}
.profit-name {
font-size: 28rpx;
color: #222;
font-weight: 500;
}
.profit-date {
font-size: 22rpx;
color: #b3b3b3;
font-weight: 400;
margin-top: 2rpx;
}
.profit-type {
flex: 1;
text-align: center;
font-family: PingFang SC;
font-weight: 400;
font-size: 14px;
line-height: 100%;
letter-spacing: 0%;
color: #4c4c4c;
font-weight: 400;
}
.profit-amount {
font-size: 28rpx;
color: #ff8917;
font-weight: 500;
margin-left: 12rpx;
min-width: 80rpx;
text-align: right;
}
</style>