wallet.vue
4.3 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<template>
<view class="page">
<view class="item">
<view class="title">账户余额</view>
<view class="money">¥{{userinfo.money}}</view>
<view class="moneyBox">
<view class="mitem" @click="chonghzi">
<image src="../../static/money_a.png" mode="widthFix" class="itemImg" />
<view class="word">我要充值</view>
</view>
<view class="mitem" @click="zhuanzhang">
<image src="../../static/money_b.png" mode="widthFix" class="itemImg" />
<view class="word">我要转账</view>
</view>
<view class="mitem" @click="tixian">
<image src="../../static/money_c.png" mode="widthFix" class="itemImg" />
<view class="word">我要提现</view>
</view>
</view>
<view class="tipsword">账户明细</view>
</view>
<view class="item">
<view class="title">赊吧剩余额度</view>
<view class="money">¥{{userinfo.borrow_money}}</view>
<view class="moneyBox">
<view class="zitem">
<view class="name">总额度</view>
<view class="word">¥{{userinfo.borrow_money_limit}}</view>
</view>
<view class="zitem">
<view class="name">全部待还</view>
<view class="word">¥{{remainshengyu}}</view>
</view>
</view>
<view class="tipsword" @click="sheba">赊吧订单</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
userinfo:'',
remainshengyu:''
}
},
onLoad() {
this.getuserinfo()
},
methods: {
// 获取用户信息
getuserinfo() {
let that = this;
var url = 'member/index';
var params = {
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.userinfo = res.data.data;
that.label = res.data.data.label;
that.nickname=res.data.data.nickname;
that.avatar=res.data.data.avatar;
that.remainshengyu=that.userinfo.borrow_money_limit*100/100-that.userinfo.borrow_money*100/100
}).catch((err) => {
})
},
// 赊吧
sheba() {
uni.navigateTo({
'url': '/pages/usercenter/myCredit'
})
},
// 我要充值
chonghzi() {
uni.navigateTo({
'url': '/pages/usercenter/recharge'
})
},
// 我要转账
zhuanzhang(){
uni.navigateTo({
url:'/pages/usercenter/transferAccounts'
})
},
// 提现
tixian(){
uni.navigateTo({
url:'/pages/usercenter/cashOut'
})
}
}
}
</script>
<style>
page {
background: #C29445;
}
.item {
width: 686rpx;
height: 382rpx;
background: url(../../static/wallet.png) no-repeat center;
background-size: cover;
margin: 30rpx auto;
padding: 50rpx 60rpx;
box-sizing: border-box;
position: relative;
}
.title {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(120, 71, 0, 1);
}
.money {
font-size: 48rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(120, 71, 0, 1);
line-height: 56rpx;
margin-top: 12rpx;
}
.moneyBox {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
padding: 0 20rpx;
box-sizing: border-box;
}
.mitem {
width: 114rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.mitem .itemImg {
width: 60rpx;
margin-bottom: 16rpx;
}
.mitem .word {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(120, 71, 0, 1);
line-height: 32rpx;
}
.zitem {
margin-top: 10rpx;
width: 43%;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
flex-direction: column;
}
.zitem .name {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(120, 71, 0, 1);
}
.zitem .word {
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(120, 71, 0, 1);
}
.tipsword {
width: 120rpx;
height: 40rpx;
background: linear-gradient(234deg, rgba(150, 100, 27, 1) 0%, rgba(120, 71, 0, 1) 100%);
border-radius: 200rpx 0 0 200rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(245, 205, 143, 1);
position: absolute;
right: 26rpx;
top: 50rpx;
display: flex;
align-items: center;
justify-content: center;
}
</style>