纸通宝小程序
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.
 

28 lines
661 B

// pages/withdrawal/balance/index.js
const request = require('../../../utils/request') //导入模块
const math = require('../../../utils/math.js')
Page({
/**
* 页面的初始数据
*/
data: {
accountMoney: '',
frozenMoney: ''
},
onShow: function () {
wx.showLoading({ title: '加载中', mask: true })
request.get('/payment-settlement-center/balance/get/balance').then(result => {
wx.hideLoading()
this.setData({
accountMoney: result.data.accountMoney,
frozenMoney: math.minus(result.data.accountMoney, result.data.frozenMoney)
})
}).catch(err => {
wx.hideLoading()
})
},
})