qianBao.vue
9.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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<template>
<view class="qianBaoContainer">
<!-- 钱包展示结束 -->
<view class="qianBaoShow relative ">
<view class="showBg relative">
<image src="/static/myImage/ic_beijign.png" mode="widthFix"></image>
<view class="showContent absolute">
<view class="content_touxiang">
<image :src="avatar" mode="widthFix"></image>
</view>
<view class="content_NameText">
{{nickName}}
</view>
</view>
</view>
<!-- 钱包展示结束 -->
<!-- 余额展示和分销记录 star-->
<view class="qianBaoCate absolute">
<!-- 余额背景展示 -->
<view class="querShow-bg relative">
<image src="/static/myImage/qianbaoBg.png" class="absolute bgImg" mode="widthFix"></image>
<!-- 余额展示内容 -->
<view class="show-content">
<view class="content-text">
当前余额
</view>
<view class="content-bottom">
<view class="content-bottom_left b1">
<text class="b1" style="font-size: 36rpx;">¥</text>
<text style="font-size: 72rpx; font-weight: 700;">{{userINfoS.money}}</text>
</view>
<view class="content-bottom_right b2" @click="tixian">
提现
</view>
</view>
</view>
</view>
<!-- 余额背景展示 -->
<!-- 余额展示end -->
<!-- 分销销售内容 -->
</view>
<!-- 余额展示和分销记录end -->
<view class="fenXiaoContainer">
<view class="fenxiaoTitle">
分销记录
</view>
<view class="fenXiaoContent ">
<view class="fenxiao-Content" v-for="(item,index) in fenXiaoArry">
<view class="fenxiao-Content-item">
<view class="item-left">
<view class="item-left-Touxiang">
<image style="width: 100%;" :src="item.avatar" mode="widthFix">
</image>
</view>
<view class="item-left-Toux-name">
{{item.nickname}}
</view>
</view>
<view class="item-right">
<view class="item-right-money">
+{{item.money}}
</view>
<view class="item-right-date">
{{item.createtime}}
</view>
<!-- 是大家看法好看 -->
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 体现钱包弹窗star -->
<u-popup v-model="show" mode="bottom" border-radius="40" width="750rpx" height="488rpx">
<view class="popup">
<!-- 体现金额 -->
<view class="tixianMoney">
输入提现金额
</view>
<!-- 体现输入框 -->
<view class="tixianInput">
<view class="input-Danwei">
¥
</view>
<view class="input-keybord">
<view class="input-wraper">
<input type="digit" :value="user_inputText" @input="getValue" placeholder="请输入金额" />
</view>
</view>
</view>
<!-- 体现按钮 -->
<view class="tixianBtn">
<view class="tixianBtn-quXiaoBtn tixianBtn-com" @click="quBtn">
取消
</view>
<view class="tixianBtn-quDingBtn tixianBtn-com" @click="tixianBtn(user_inputText)">
提现
</view>
</view>
</view>
</u-popup>
<!-- 体现弹窗end -->
</view>
</template>
<script>
import Login from '../../../login.js'
export default {
data() {
return {
userINfoS:'',//钱包页面的用户信息obj
avatar: '', // 头像
nickName: '', // 昵称
get_QianbaoData: '',//钱包渲染数据
user_inputText: '', //用户输入的体现金额
show: false, //钱包体现按钮
fenXiaoArry: '', //分销数据arry
}
},
onShow() {
this.get_QianbaoData_Arry(); //请求后台钱包数据
},
onLoad() {
},
methods: {
get_QianbaoData_Arry() {
let that = this;
that.avatar = uni.getStorageSync("avatar");
that.nickName = uni.getStorageSync("nickName");
that.$rqs('/api/user/money').then(res => {
console.log(res, "____________");
that.get_QianbaoData = res.data.data;
that.userINfoS = res.data.data.user;
that.fenXiaoArry = res.data.data.wallet;
console.log(res.data.data.wallet, "==============================,wallet");
that.fenXiaoArry.forEach(item =>{
item.money = (Number(item.money)).toFixed(0);
})
})
},
close() {
this.show = false
},
tixian() {
this.show = !this.show
},
//取消体现
quBtn() {
this.close()
},
// 监听用户体现金额
getValue(e){
this.user_inputText = Number(e.detail.value);
},
//微信体现 e 就是体现金额
tixianBtn(e) {
console.log("点击体现");
if(Number(this.user_inputText) > 0 && Number(this.user_inputText) < Number(this.userINfoS.money)){
console.log(true);
this.$rqs('/api/user/tixian',{money:Number(this.user_inputText)},"GET").then(res=>{
console.log(res);
})
}else{
console.log(false);
uni.showToast({
title:'请输入正确全额',
icon:'none'
})
}
}
}
}
</script>
<style>
page {
background-color: #F7F8FB;
}
.qianBaoShow {
height: 416rpx;
}
.showBg {
height: 416rpx;
}
.showBg image {
width: 100%;
}
.fenXiaoContainer {
padding: 48rpx;
box-sizing: border-box;
margin-top: 48rpx;
}
.qianbaoContent {
height: 100%;
padding-top: 164rpx;
width: 100%;
top: 0;
}
.showContent {
height: 116rpx;
display: flex;
align-items: center;
justify-content: center;
top: 100rpx;
left: 40rpx;
}
.content_touxiang {
width: 116rpx;
height: 116rpx;
border-radius: 58rpx;
overflow: hidden;
}
.content_touxiang image {
width: 100%;
}
.content_NameText {
margin-left: 24rpx;
color: rgba(255, 255, 255, 1);
font-size: 34rpx;
font-weight: 700;
}
.qianBaoCate {
width: 100%;
transform: translateY(-152rpx);
}
.qianBaoBg {
width: 100%;
height: 100%;
}
.qianBaoCate image {
width: 100%;
}
.querShow {
width: 670rpx;
border-radius: 24rpx;
top: -92rpx;
left: 40rpx;
margin-bottom: 48rpx;
}
.querShow-bg {
width: 670rpx;
height: 208rpx;
border-radius: 24rpx;
margin: 0 auto;
z-index: 1;
}
.qianBaoCate::after {
content: '';
width: 100%;
height: 116rpx;
background-color: #F7F8FB;
border-radius: 40rpx;
position: absolute;
z-index: -1;
left: 0;
bottom: 0;
transform: translateY(10rpx);
}
.querShow-bg image {
width: 670rpx;
height: 208rpx;
border-radius: 24rpx;
}
.show-content {
padding: 24rpx 24rpx 14rpx 32rpx;
box-sizing: border-box;
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
border-radius: 40rpx 40rpx 0 0;
}
.content-bottom {
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
}
.content-text {
color: rgba(62, 85, 78, 1);
font-size: 32rpx;
}
.b1 {
color: #EBC39A;
font-size: 72rpx;
font-weight: 700;
font-family: "D-DIN";
}
.b2 {
width: 150rpx;
height: 56rpx;
border-radius: 48rpx;
line-height: 56rpx;
text-align: center;
color: #FFFFFF;
background-color: #3E554E;
}
.fenXianContent {
height: 100%;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
background: rgba(247, 248, 251, 1);
box-sizing: border-box;
padding: 0 40rpx;
}
.fenxiaoTitle {
color: rgba(31, 31, 31, 1);
font-size: 36rpx;
font-weight: 700;
margin-bottom: 24rpx;
}
.fenXiao-Content {
box-sizing: border-box;
padding: 0 32rpx;
height: 130rpx;
}
.fenxiao-Content-item {
/* width: 670rpx; */
height: 130rpx;
background-color: #f6f8fa;
box-sizing: border-box;
padding: 32rpx 0 34rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #eceef0;
}
.bgImg {
z-index: -1;
}
.item-left {
display: flex;
align-items: center;
}
.item-right {
display: flex;
flex-direction: column;
align-items: center;
}
.item-left-Toux-name {
margin-left: 16rpx;
}
.item-left-Touxiang {
width: 64rpx;
height: 64rpx;
}
.item-right-money {
color: rgba(235, 195, 154, 1);
font-size: 36rpx;
font-weight: 700;
}
.item-right-date {
margin-top: 6rpx;
color: rgba(200, 201, 204, 1);
font-size: 22rpx;
font-weight: 500;
}
.tixian {}
.popup {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 48rpx 32rpx 68rpx;
}
.tixianMoney {
height: 44rpx;
color: rgba(50, 50, 51, 1);
font-size: 32rpx;
font-weight: 700;
margin-bottom: 44rpx;
}
.tixianInput {
display: flex;
width: 654rpx;
margin-bottom: 74rpx;
height: 104rpx;
align-items: center;
justify-content: flex-start;
border: 0.10rpx solid rgba(0.7599999904632568, 0.7599999904632568, 0.7599999904632568, 1);
}
.input-Danwei {
width: 52rpx;
height: 64rpx;
color: rgba(31, 31, 31, 1);
font-size: 52rpx;
font-weight: 700;
margin-right: 8rpx;
margin-left: 24rpx;
}
.input-keybord {
color: rgba(194, 194, 194, 1);
font-size: 32rpx;
font-weight: 400;
}
.input-keybord .input-wraper {
width: 100%;
height: 100%;
}
.tixianBtn {
display: flex;
align-items: center;
justify-content: space-between;
}
.tixianBtn-com {
width: 330rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
}
.tixianBtn-quDingBtn {
background-color: #3E554E;
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
font-weight: 400;
}
.tixianBtn-quXiaoBtn {
background-color: #FFFFFF;
color: rgba(31, 31, 31, 1);
font-size: 28rpx;
border: 2rpx solid rgba(0.8623999953269958, 0.8688533306121826, 0.8799999952316284, 1);
background: rgba(255, 255, 255, 1);
}
</style>