myWallet.vue
3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<template>
<view class="wallet_bg">
<view class="banner card">
<view class="my_money">
<text>钱包余额</text>
<text class="number">¥2000.00</text>
</view>
<!-- 收益列表 -->
<view class="day_list dis-flex flex-y-center flex-x-around">
<view class="dis-flex flex-dir-column flex-y-center">
<text class="col-9 f-24 l-h-32 mb-10">今日收益</text>
<text class="f-w-500 col-3 f-32 l-h-42">¥567.12</text>
</view>
<view class="dis-flex flex-dir-column flex-y-center">
<text class="col-9 f-24 l-h-32 mb-10">今日支出</text>
<text class="f-w-500 col-3 f-32 l-h-42">¥567.12</text>
</view>
<view class="dis-flex flex-dir-column flex-y-center">
<text class="col-9 f-24 l-h-32 mb-10">累积收益</text>
<text class="f-w-500 col-3 f-32 l-h-42">¥567.12</text>
</view>
</view>
<view class="dis-flex flex-y-center m-top30">
<view class="use col-3 f-32 f-w-500">提现</view>
<view class="recharge col-f f-32 f-w-500">充值</view>
</view>
</view>
<view class="card m-top20">
<!-- 头部模块 -->
<view class="header">
<view class="title">收支账单</view>
<u-tabs
:list="list"
lineColor="#FFA100"
:activeStyle="{ color: '#FFA100' }"
itemStyle="padding-left: 15px; padding-right: 15px; height: 92rpx;width: 33%;box-sizing: border-box;"
@click="toggleData"
/>
</view>
<!-- 账单列表 -->
<view class="bill_list">
<u-cell-group :border="false">
<u-cell
v-for="(item, index) in billList"
:key="index" :title="item.name"
:label="item.createTime"
:value="priceActive(item)"
:border="false"
/>
</u-cell-group>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [
{ name: '全部', id: 1},
{ name: '收入', id: 2},
{ name: '支出', id: 3},
],
billList: [
{ name: '南宁站 000026', createTime: '2022-12-26 14:00:35', price: '1.09', status: 'add' },
{ name: '南宁站 000026', createTime: '2022-12-26 14:00:35', price: '1.09', status: 'add' },
{ name: '提现', createTime: '2022-12-26 14:00:35', price: '1.09', status: 'minus' },
{ name: '提现', createTime: '2022-12-26 14:00:35', price: '1.09', status: 'minus' },
]
};
},
computed: {
priceActive(){
return (item) => {
return item.status === 'add' ? `+ ${item.price}` : `- ${item.price}`
}
}
},
methods: {
toggleData(){
}
}
}
</script>
<style lang="scss" scoped>
.wallet_bg{
padding: 20rpx 30rpx;
background-color: #F5F6FA;
min-height: 100vh;
.card{
background-color: #fff;
border-radius: 12rpx;
}
.banner{
padding: 36rpx 20rpx;
border-radius: 16rpx;
overflow: hidden;
.my_money{
display: flex;
align-items: center;
flex-direction: column;
gap: 20rpx;
font-size: 28rpx;
line-height: 38rpx;
color: #3d3d3d;
margin-bottom: 40rpx;
.number{
font-size: 40rpx;
font-weight: 500;
line-height: 54rpx;
}
}
.use{
flex: 1;
height: 80rpx;
border-radius: 12rpx;
border: 2rpx solid #333333;
margin-right: 10rpx;
text-align: center;
line-height: 80rpx;
}
.recharge{
flex: 1;
height: 80rpx;
border-radius: 12rpx;
background-color: #333;
text-align: center;
line-height: 80rpx;
}
}
.bill_list{
margin-top: 30rpx;
}
}
.header{
border-bottom: 1px solid #e1e1e1;
padding-top: 30rpx;
.title{
position: relative;
width: 120rpx;
margin: 0 auto;
font-size: 28rpx;
color: #3d3d3d;
line-height: 38rpx;
&::before{
content: '';
position: absolute;
top: 50%;
transform: translateY(-50%);
left: -50rpx;
width: 30rpx;
height: 2rpx;
background: linear-gradient(to right, #fff, #333);
}
&::after{
content: '';
position: absolute;
top: 50%;
right: -50rpx;
transform: translateY(-50%);
width: 30rpx;
height: 2rpx;
background: linear-gradient(to right, #333, #fff);
}
}
}
</style>