withdrawalNote.js
2.83 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
// import MineApi from '~/api/mineApi/index'
Page({
data: {
STATUSICON: ['waiteing', 'comlpete', 'fail', 'ht'],
STATUSTEXT:['处理中','提现成功','提现成功','后台核销'],
listData: [],
isNoResult: false
},
toastError(e){
const {
reason
} = e.currentTarget.dataset
// wx.$api.showToast(reason);
wx.showModal({
title: '',
content:String(reason) ,
showCancel: false,
confirmText: '我知道了',
confirmColor: '#1B233D',
success(res) {
}
})
},
onLoad(options) {
// MineApi.getWithdrawalListApi().then(res => {
// if (res && res.length) {
let res=[ {
"id" : 16118,
"wechatAvatarUrl" : null,
"wechatNickName" : null,
"withdrawalScore" : 50995.46,
"withdrawalTime" : "2025-08-15 09:48",
"successTime" : null,
"status" : 4,
"type" : 3,
"bankUserName" : "望周知",
"bankName" : "中国邮政储蓄银行",
"bankNumber" : "6555555555555555555",
"bankPhone" : "18955555555",
"idCardNo" : "341181199508252222",
"exportStatus" : 0,
"failReason" : null,
"source" : 1
},{"id" : 16067,
"wechatAvatarUrl" : null,
"wechatNickName" : null,
"withdrawalScore" : 32.00,
"withdrawalTime" : "2024-11-08 17:17",
"successTime" : "2024-11-08 17:25",
"status" : 3,
"type" : 3,
"bankUserName" : "姚孝章",
"bankName" : "招商银行",
"bankNumber" : "6214830050900165",
"bankPhone" : "13650810420",
"idCardNo" : "440582199609153643",
"exportStatus" : 0,
"failReason" : null,
"source" : 1
}, {
"id" : 16066,
"wechatAvatarUrl" : null,
"wechatNickName" : null,
"withdrawalScore" : 30.50,
"withdrawalTime" : "2024-11-08 15:55",
"successTime" : null,
"status" : 2,
"type" : 3,
"bankUserName" : "姚孝章",
"bankName" : "招商银行",
"bankNumber" : "6214830050900165",
"bankPhone" : "13650810420",
"idCardNo" : "440582199609153643",
"exportStatus" : 0,
"failReason" : null,
"source" : 1
} ]
console.log(2222)
res.map(item => {
if (item.status == 3) {
item.iconType = 1
} else if (item.status == 4) {
item.iconType = 2
} else {
item.iconType = 0
}
if (item.type == 2) {
item.iconType = 3
}
if(item.type == 3 && item.bankNumber ){
item.bankNumber = item.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
}
return item
})
// }
let flag = res.length ? false : true
this.setData({
listData: res || [],
isNoResult: flag
})
// })
}
})