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.
25 lines
595 B
25 lines
595 B
// pages/withdrawal/balance/index.js
|
|
import { getBalanceInfo } from "../../api/payment"
|
|
const math = require('../../../utils/math')
|
|
|
|
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)
|
|
})
|
|
}).catch(err => {
|
|
wx.hideLoading()
|
|
})
|
|
}
|
|
})
|