withdrawalNote.js 2.83 KB

// 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
      })
    // })
  }


})