|
@@ -1,72 +1,86 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="page">
|
3
|
|
- <div class="info card">
|
4
|
|
- <h1 class="tit">账号信息</h1>
|
5
|
|
- <ul class="info-list">
|
6
|
|
- <li class="item">
|
7
|
|
- <div class="key">姓名:</div>
|
8
|
|
- <div class="value">cr</div>
|
9
|
|
- </li>
|
10
|
|
- <li class="item">
|
11
|
|
- <div class="key">微信号:</div>
|
12
|
|
- <div class="value">wx1503213</div>
|
13
|
|
- </li>
|
14
|
|
- <li class="item">
|
15
|
|
- <div class="key">银行:</div>
|
16
|
|
- <div class="value">招商银行</div>
|
17
|
|
- </li>
|
18
|
|
- <li class="item">
|
19
|
|
- <div class="key">开户行:</div>
|
20
|
|
- <div class="value">北京市xxx</div>
|
21
|
|
- </li>
|
22
|
|
- <li class="item">
|
23
|
|
- <div class="key">卡号:</div>
|
24
|
|
- <div class="value">6225845254521545215</div>
|
25
|
|
- </li>
|
26
|
|
- </ul>
|
|
3
|
+ <div
|
|
4
|
+ v-if="!loading && !account"
|
|
5
|
+ class="go-bind"
|
|
6
|
+ @click="jump('/pages/wallet/bind')"
|
|
7
|
+ >
|
|
8
|
+ 您还未绑定账号,请先绑定绑定账号
|
27
|
9
|
</div>
|
28
|
|
- <div class="money card">
|
29
|
|
- <h1 class="tit">可提现金额</h1>
|
30
|
|
- <div class="money-num">
|
31
|
|
- <div class="num">¥960.00</div>
|
32
|
|
- <div class="view" @click="jump('/pages/wallet/bill')">
|
33
|
|
- 查看账单
|
|
10
|
+ <block v-if="!loading && account">
|
|
11
|
+ <!-- <block> -->
|
|
12
|
+ <div class="info card">
|
|
13
|
+ <h1 class="tit">账号信息</h1>
|
|
14
|
+ <ul class="info-list">
|
|
15
|
+ <li class="item">
|
|
16
|
+ <div class="key">姓名:</div>
|
|
17
|
+ <div class="value">{{ account.name }}</div>
|
|
18
|
+ </li>
|
|
19
|
+ <li class="item">
|
|
20
|
+ <div class="key">微信号:</div>
|
|
21
|
+ <div class="value">{{ account.wechat }}</div>
|
|
22
|
+ </li>
|
|
23
|
+ <li class="item">
|
|
24
|
+ <div class="key">银行:</div>
|
|
25
|
+ <div class="value">{{ account.bank }}</div>
|
|
26
|
+ </li>
|
|
27
|
+ <li class="item">
|
|
28
|
+ <div class="key">开户行:</div>
|
|
29
|
+ <div class="value">{{ account.bankBranch }}</div>
|
|
30
|
+ </li>
|
|
31
|
+ <li class="item">
|
|
32
|
+ <div class="key">卡号:</div>
|
|
33
|
+ <div class="value">{{ account.bankAccount }}</div>
|
|
34
|
+ </li>
|
|
35
|
+ </ul>
|
|
36
|
+ </div>
|
|
37
|
+ <div class="money card">
|
|
38
|
+ <h1 class="tit">可提现金额</h1>
|
|
39
|
+ <div class="money-num">
|
|
40
|
+ <div class="num">¥{{ balance / 100 }}</div>
|
|
41
|
+ <div class="view" @click="jump('/pages/wallet/bill')">
|
|
42
|
+ 查看账单
|
|
43
|
+ </div>
|
34
|
44
|
</div>
|
|
45
|
+ <p class="tip">最低提现2元,单日上线20000元</p>
|
|
46
|
+ <div class="input">
|
|
47
|
+ <input type="digit" v-model="formVal" placeholder="¥0" />
|
|
48
|
+ </div>
|
|
49
|
+ <p class="tip tip-color">提现金额超出总金额,请重新填写</p>
|
|
50
|
+ <button type="button" class="btn" @click="withdrawal">
|
|
51
|
+ 申请提现
|
|
52
|
+ </button>
|
35
|
53
|
</div>
|
36
|
|
- <p class="tip">最低提现2元,单日上线20000元</p>
|
37
|
|
- <div class="input">
|
38
|
|
- <input type="digit" v-model="formVal" placeholder="¥0" />
|
|
54
|
+ <div class="card record">
|
|
55
|
+ <h1 class="tit">提现记录</h1>
|
|
56
|
+ <ul class="table">
|
|
57
|
+ <li class="row">
|
|
58
|
+ <div class="item">申请时间</div>
|
|
59
|
+ <div class="item">备注</div>
|
|
60
|
+ <div class="item">金额</div>
|
|
61
|
+ <div class="item">状态</div>
|
|
62
|
+ </li>
|
|
63
|
+ <li
|
|
64
|
+ class="row"
|
|
65
|
+ v-for="item of withdrawalList"
|
|
66
|
+ :key="item.id"
|
|
67
|
+ >
|
|
68
|
+ <div class="item">
|
|
69
|
+ {{ item.applyTime | dateFormat("yyyy/MM/dd") }}
|
|
70
|
+ </div>
|
|
71
|
+ <div class="item">
|
|
72
|
+ {{ item.remark }}
|
|
73
|
+ </div>
|
|
74
|
+ <div class="item">
|
|
75
|
+ {{ item.amount / 100 }}
|
|
76
|
+ </div>
|
|
77
|
+ <div class="item">
|
|
78
|
+ {{ item.status | status }}
|
|
79
|
+ </div>
|
|
80
|
+ </li>
|
|
81
|
+ </ul>
|
39
|
82
|
</div>
|
40
|
|
- <p class="tip tip-color">提现金额超出总金额,请重新填写</p>
|
41
|
|
- <button type="button" class="btn" @click="withdrawal">
|
42
|
|
- 申请提现
|
43
|
|
- </button>
|
44
|
|
- </div>
|
45
|
|
- <div class="card record">
|
46
|
|
- <h1 class="tit">提现记录 共{{ withdrawalTotal }}条</h1>
|
47
|
|
- <ul class="table">
|
48
|
|
- <li class="row">
|
49
|
|
- <div class="item">申请时间</div>
|
50
|
|
- <div class="item">提现方式</div>
|
51
|
|
- <div class="item">金额</div>
|
52
|
|
- <div class="item">状态</div>
|
53
|
|
- </li>
|
54
|
|
- <li class="row" v-for="item of withdrawalList" :key="item.id">
|
55
|
|
- <div class="item">
|
56
|
|
- {{ item.applyTime | dateFormat("yyyy/MM/dd") }}
|
57
|
|
- </div>
|
58
|
|
- <div class="item">
|
59
|
|
- <!-- {{item.status}} -->
|
60
|
|
- </div>
|
61
|
|
- <div class="item">
|
62
|
|
- {{ item.amount / 100 }}
|
63
|
|
- </div>
|
64
|
|
- <div class="item">
|
65
|
|
- {{ item.status }}
|
66
|
|
- </div>
|
67
|
|
- </li>
|
68
|
|
- </ul>
|
69
|
|
- </div>
|
|
83
|
+ </block>
|
70
|
84
|
|
71
|
85
|
<uni-popup ref="popup" type="dialog">
|
72
|
86
|
<uni-popup-dialog
|
|
@@ -95,14 +109,29 @@ export default {
|
95
|
109
|
formVal: "",
|
96
|
110
|
withdrawalPageIndex: 1,
|
97
|
111
|
withdrawalList: [],
|
98
|
|
- withdrawalTotal: 0,
|
|
112
|
+ withdrawalTotal: "",
|
|
113
|
+ account: null,
|
|
114
|
+ balance: 0,
|
|
115
|
+ loading: false,
|
99
|
116
|
};
|
100
|
117
|
},
|
101
|
|
- filters: {},
|
102
|
|
- onLoad() {
|
103
|
|
- this.getWithdrawalList();
|
|
118
|
+ filters: {
|
|
119
|
+ status(v) {
|
|
120
|
+ let obj = {
|
|
121
|
+ 0: "审核中",
|
|
122
|
+ 1: "待打款",
|
|
123
|
+ 2: "已完成",
|
|
124
|
+ 3: "未通过",
|
|
125
|
+ 4: "打款失败",
|
|
126
|
+ };
|
|
127
|
+ let str = obj[v];
|
|
128
|
+ return str || "";
|
|
129
|
+ },
|
|
130
|
+ },
|
|
131
|
+ onLoad() {},
|
|
132
|
+ async onShow() {
|
|
133
|
+ this.getWithdrawalInfo();
|
104
|
134
|
},
|
105
|
|
- async onShow() {},
|
106
|
135
|
|
107
|
136
|
// onPullDownRefresh() {
|
108
|
137
|
// this.getList();
|
|
@@ -110,21 +139,33 @@ export default {
|
110
|
139
|
|
111
|
140
|
// 函数
|
112
|
141
|
methods: {
|
113
|
|
- getWithdrawalList() {
|
114
|
|
- this.api
|
115
|
|
- .get("/User/GetWithdrawalList", {
|
116
|
|
- pageIndex: this.withdrawalPageIndex,
|
117
|
|
- })
|
118
|
|
- .then((res) => {
|
119
|
|
- this.withdrawalList = res.data.data;
|
120
|
|
- this.withdrawalTotal = res.data.pager.totalItems;
|
121
|
|
- });
|
|
142
|
+ getWithdrawalInfo() {
|
|
143
|
+ uni.showLoading({
|
|
144
|
+ title: "加载中...",
|
|
145
|
+ });
|
|
146
|
+ this.loading = true;
|
|
147
|
+ this.api.get("/User/GetWithdrawalInfo").then((res) => {
|
|
148
|
+ uni.hideLoading();
|
|
149
|
+ this.loading = false;
|
|
150
|
+ if (!res.data.account) {
|
|
151
|
+ // this.router.push('/pages/wallet/bind');
|
|
152
|
+ // return;
|
|
153
|
+ }
|
|
154
|
+ this.account = res.data.account;
|
|
155
|
+ this.balance = res.data.balance;
|
|
156
|
+ this.withdrawalList = res.data.withdrawalList.data;
|
|
157
|
+ });
|
122
|
158
|
},
|
123
|
159
|
|
124
|
160
|
withdrawal() {
|
125
|
161
|
if (!this.formVal) {
|
126
|
162
|
return this.fn.showToast("请输入提现金额");
|
127
|
163
|
}
|
|
164
|
+ if (this.formVal * 100 > this.balance) {
|
|
165
|
+ return this.fn.showToast(
|
|
166
|
+ "提现金额不能大于" + this.balance / 100 + "元"
|
|
167
|
+ );
|
|
168
|
+ }
|
128
|
169
|
this.$refs.popup.open({
|
129
|
170
|
type: "dialog",
|
130
|
171
|
});
|
|
@@ -137,23 +178,27 @@ export default {
|
137
|
178
|
uni.showLoading({
|
138
|
179
|
title: "提交中...",
|
139
|
180
|
});
|
140
|
|
- let data = {
|
141
|
|
- amount:this.formVal/100,
|
142
|
|
- remark:value
|
143
|
|
- };
|
144
|
|
- this.api.post("/User/Withdrawal", data, { pass: true }).then((res) => {
|
145
|
|
- this.submitLoading = false;
|
146
|
|
- uni.hideLoading();
|
147
|
|
- if (res.success) {
|
148
|
|
-
|
149
|
|
- // 刷新页面数据
|
150
|
|
- } else {
|
151
|
|
- this.fn.showModal({
|
152
|
|
- content:'错误信息:'+res.message,
|
153
|
|
- showCancel: false,
|
154
|
|
- });
|
155
|
|
- }
|
156
|
|
- });
|
|
181
|
+ let data = {
|
|
182
|
+ amount: this.formVal * 100,
|
|
183
|
+ remark: value,
|
|
184
|
+ };
|
|
185
|
+ this.api
|
|
186
|
+ .post("/User/Withdrawal", data, { pass: true })
|
|
187
|
+ .then((res) => {
|
|
188
|
+ this.submitLoading = false;
|
|
189
|
+ uni.hideLoading();
|
|
190
|
+ if (res.success) {
|
|
191
|
+ // 刷新页面数据
|
|
192
|
+ this.formVal = "";
|
|
193
|
+ this.getWithdrawalInfo();
|
|
194
|
+ this.fn.showToast("提现成功");
|
|
195
|
+ } else {
|
|
196
|
+ this.fn.showModal({
|
|
197
|
+ content: "错误信息:" + res.message,
|
|
198
|
+ showCancel: false,
|
|
199
|
+ });
|
|
200
|
+ }
|
|
201
|
+ });
|
157
|
202
|
done();
|
158
|
203
|
},
|
159
|
204
|
},
|
|
@@ -256,7 +301,31 @@ export default {
|
256
|
301
|
font-size: px(42);
|
257
|
302
|
// text-align: center;
|
258
|
303
|
padding: px(20);
|
|
304
|
+ @include omits(4);
|
|
305
|
+ &:nth-child(1){
|
|
306
|
+ width: 30%;
|
|
307
|
+ }
|
|
308
|
+ &:nth-child(2){
|
|
309
|
+ width: 30%;
|
|
310
|
+ }
|
|
311
|
+ &:nth-child(3){
|
|
312
|
+ width: 20%;
|
|
313
|
+ }
|
|
314
|
+ &:nth-child(4){
|
|
315
|
+ width: 20%;
|
|
316
|
+ }
|
259
|
317
|
}
|
260
|
318
|
}
|
261
|
319
|
}
|
|
320
|
+.go-bind {
|
|
321
|
+ margin: px(40);
|
|
322
|
+ border: 1px solid #f1f1f1;
|
|
323
|
+ border-radius: px(10);
|
|
324
|
+ display: flex;
|
|
325
|
+ align-items: center;
|
|
326
|
+ justify-content: center;
|
|
327
|
+ background-color: #fff;
|
|
328
|
+ min-height: px(300);
|
|
329
|
+ font-size: px(46);
|
|
330
|
+}
|
262
|
331
|
</style>
|