record.js
1.21 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
import MineApi from '../../../api'
Page({
data: {
STATUSICON: ['waiteing', 'comlpete', 'fail', 'ht'],
listData: [],
isNoResult: true
},
toastError(e){
const {
reason
} = e.currentTarget.dataset
console.log(reason)
// wx.$util.showToast(reason);
wx.showModal({
title: '',
content:String(reason) ,
showCancel: false,
confirmText: '我知道了',
confirmColor: '#1B233D',
success(res) {
}
})
},
onRoute(options) {
MineApi.getWithdrawalListApi().then(res => {
if (res.code==0 && res.data) {
res.data.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.data.length ? false : true
this.setData({
listData: res.data || [],
isNoResult: flag
})
})
}
})