账单查询
This commit is contained in:
@@ -2,6 +2,9 @@ Page({
|
||||
data: {
|
||||
noMoney : "****",
|
||||
hiddenMoney: false,
|
||||
sumBalance: 0,
|
||||
cashBalance: 0,
|
||||
oweBalance: 0,
|
||||
cashAccountList : [
|
||||
{"name":"现金","money":"2000.00"},
|
||||
{"name":"银行卡","money":"30500.03"}
|
||||
@@ -17,6 +20,28 @@ Page({
|
||||
if (wx.canIUse('hideHomeButton')) {
|
||||
wx.hideHomeButton()
|
||||
}
|
||||
app.$api.getSettings().then(setting => {
|
||||
if (setting.data){
|
||||
let cashAccountList = setting.data.CASH_SETTING
|
||||
let sumBalance = 0;
|
||||
let cashBalance = 0;
|
||||
cashAccountList.forEach(item => {
|
||||
if (item.balance){
|
||||
cashBalance = cashBalance + item.balance
|
||||
sumBalance = sumBalance + item.balance
|
||||
}
|
||||
})
|
||||
let oweAccountList = setting.data.OWE_SETTING
|
||||
let oweBalance = 0;
|
||||
oweAccountList.forEach(item => {
|
||||
if (item.balance){
|
||||
oweBalance = oweBalance + item.balance
|
||||
sumBalance = sumBalance + item.balance
|
||||
}
|
||||
})
|
||||
this.setData({cashAccountList,oweAccountList,cashBalance,oweBalance,sumBalance})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeHidden () {
|
||||
let isHidden = this.data.hiddenMoney;
|
||||
|
||||
Reference in New Issue
Block a user