const app = getApp();
Page({
    data: {
        cashAccountList : [
            {"name":"现金","money":"2000.00"},
            {"name":"银行卡","money":"30500.03"}
        ],
        oweAccountList : [
            {"name":"信用卡","money":"-200.00"},
        ],
    },
    onShow: function () {
        app.$api.getSettings().then(setting => {
            if (setting.data){
                let cashAccountList = setting.data.CASH_SETTING
                let oweAccountList = setting.data.OWE_SETTING
                this.setData({cashAccountList,oweAccountList})
            }
        })
    },
    handleClick() {
        wx.navigateTo({
            url : "../edit/index?isAccount=1&isIncome=0&isAdd=1"
        })
    }
});
