withdrawalNote.js
1.82 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
// import MineApi from '~/api/mineApi/index'
Page({
data: {
STATUSICON: ['waiteing', 'comlpete', 'fail', 'ht'],
STATUSTEXT: ['处理中', '提现成功', '提现成功', '后台核销'],
pageSize: 9999,
pageNum: 1,
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) {
this.getScoreWithdrawalPage()
},
getScoreWithdrawalPage() {
const {
phone,
channelSource,
merchantId
} = wx.p.storage.get('userInfo'), {
pageNum,
pageSize
} = this.data;
wx.p.api.withdrawalApi.getScoreWithdrawalPage({
staffPhone:phone,
channelSource,
merchantId,
// staffPhone: 15626599735,
// channelSource: 1,
pageNum,
pageSize
}).then(res => {
console.log(res)
if (res.code == 0) {
res.data.list.map((item)=>{
item.list.map(item2 => {
if (item2.status == 3) {
item2.iconType = 1
} else if (item2.status == 4) {
item2.iconType = 2
} else {
item2.iconType = 0
}
if (item2.type == 2) {
item2.iconType = 3
}
if (item2.type == 3 && item2.bankNumber) {
item2.bankNumber = item2.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
}
return item2
})
})
}
// }
let flag = res.data.list.length ? false : true
this.setData({
listData: res.data.list || [],
isNoResult: flag
})
})
}
})