纸通宝SAAS仓库
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.
 

43 lines
1.2 KiB

// pages/message/detail/index.js
import Scene from '../../index/scene'
import { getBalanceInfo } from "../../../api/payment"
const math = require('../../../utils/math')
const util = require('../../../utils/util')
const app = getApp()
Scene({
/**
* 页面的初始数据
*/
data: {
accountMoney: '',
frozenMoney: ''
},
onShow: function () {
wx.showLoading({ title: '加载中', mask: true })
getBalanceInfo().then(result => {
wx.hideLoading()
this.setData({
accountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney),
frozenMoney: 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()
this.setData({
StatusBar: app.globalData.StatusBar || 40,
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80),
Custom: app.globalData.Custom
})
})
},
backspace:function(e){
wx.navigateBack()
},
withdrawal: function(){
wx.navigateTo({ url: '/pages/settlement/withdrawal/index' })
}
})