myWallet.vue
2.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
<template>
<view class="wallet_bg">
<view class="banner">
<image class="bg-img" src="@/static/myImage/wallet-bg.png" mode="widthFix"></image>
<view class="my_money">
<text>我的余额</text>
<text>¥<text class="number">0.00</text> </text>
</view>
<view class="use">提现</view>
<view class="recharge">充值</view>
</view>
<u-tabs
:list="list"
:lineColor="ThemeColor.PrimaryColor"
:activeStyle="{ color: ThemeColor.PrimaryColor }"
itemStyle="padding-left: 15px; padding-right: 15px; height: 92rpx;width: 33%;box-sizing: border-box;"
@click="toggleData"
/>
<!-- 账单列表 -->
<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>
</template>
<script>
import ThemeColor from '@/utils/themeColor';
export default {
data() {
return {
ThemeColor,
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: #F6F6F6;
min-height: 100vh;
.banner{
position: relative;
height: 288rpx;
border-radius: 16rpx;
.bg-img{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.my_money{
position: absolute;
top: 38rpx;
left: 28rpx;
display: flex;
flex-direction: column;
gap: 8rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fff;
.number{
font-size: 52rpx;
font-weight: 700;
line-height: 64rpx;
margin-left: 4rpx;
}
}
.use{
position: absolute;
top: 96rpx;
left: 192rpx;
width: 96rpx;
height: 44rpx;
background: #FFFFFF;
border-radius: 40rpx;
text-align: center;
line-height: 44rpx;
color: $uni-color-primary;
font-size: 24rpx;
}
.recharge{
position: absolute;
top: 34rpx;
right: 34rpx;
width: 128rpx;
height: 48rpx;
background: rgba(255,255,255,0.4);
border-radius: 40rpx;
color: #fff;
line-height: 48rpx;
text-align: center;
font-size: 24rpx;
border: 2rpx solid #FFFFFF;
}
}
.bill_list{
margin-top: 30rpx;
}
}
</style>