纸通宝小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

37 lines
1.0 KiB

// pages/withdrawal/balance/index.js
import { getBalanceInfo } from "../../api/payment"
const math = require('../../../utils/math')
const util = require('../../../utils/util')
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
accountMoney: '',
frozenMoney: ''
},
onShow: function () {
wx.showLoading({ title: '加载中', mask: true })
getBalanceInfo().then(result => {
wx.hideLoading()
this.setData({
accountMoney: result.data.accountMoney,
frozenMoney: math.minus(result.data.accountMoney, result.data.frozenMoney),
StatusBar: app.globalData.StatusBar || 40,
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80),
Custom: app.globalData.Custom
})
}).catch(err => {
wx.hideLoading()
})
},
toPage:function(e){
if (e.currentTarget.id == 'toTx') {
util.navigateTo('/pages/withdrawal/vcheckout/index')
} else if (e.currentTarget.id == 'toRt') {
wx.navigateBack()
}
}
})