| | |
| | | pageSize: 20, //充值记录每页记录数 |
| | | loading: false, //是否正在加载 |
| | | hasMore: true, |
| | | moneyList:[]//充值金额 |
| | | }, |
| | | |
| | | /** |
| | |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | this.getRechargList() |
| | | this.getRechargList(); |
| | | this. getMorneyList(); |
| | | }, |
| | | |
| | | /** |
| | |
| | | const data = { |
| | | sessionId: getApp().globalData.sessionId, |
| | | vcId: this.data.vcId, //虚拟卡ID |
| | | rechargeAmount: 1 //(单位是分) |
| | | rechargeAmount: this.data.moneyList[this.data.activeIndex]//(单位是分) |
| | | }; |
| | | console.log("postCloseValaue" + data); |
| | | post({ |
| | |
| | | this.setData({ |
| | | allRechargeList: updatedList |
| | | }); |
| | | }, |
| | | //获取金额 |
| | | getMorneyList(){ |
| | | const params = { |
| | | url: 'wx/virtual_card/gerRechargeProfiles' |
| | | }; |
| | | get(params).then(data => { |
| | | this.setData({ |
| | | moneyList: data.content , |
| | | }) |
| | | this.updateDisplayText(); |
| | | }).catch(err => { |
| | | // 错误回调 |
| | | wx.showToast({ |
| | | title: err.msg, |
| | | icon: 'error', |
| | | duration: 3000 |
| | | }) |
| | | }); |
| | | } |
| | | }) |