This commit is contained in:
2023-02-06 22:01:07 +08:00
parent 40ca4223dd
commit f2261a3066
26 changed files with 103 additions and 38 deletions

View File

@@ -1,3 +1,4 @@
const app = getApp();
Page({
data: {
cashAccountList : [
@@ -8,8 +9,14 @@ Page({
{"name":"信用卡","money":"-200.00"},
],
},
onLoad: function (options) {
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({

View File

@@ -5,8 +5,8 @@
<t-cell wx:for="{{cashAccountList}}" wx:key="index"
title="{{item.name}}"
align="top"
image="/image/account/11.png"
url="../edit/index?isAccount=true"
image="{{item.icon}}"
url="../edit/index?isAccount=1&isIncome=0&isAdd=0&id={{item.id}}"
/>
</t-cell-group>
<view class="padding_box">
@@ -16,8 +16,8 @@
<t-cell wx:for="{{oweAccountList}}" wx:key="index"
title="{{item.name}}"
align="top"
image="/image/account/4.png"
url="../edit/index?isAccount=1&isIncome=0&isAdd=0"
image="{{item.icon}}"
url="../edit/index?isAccount=1&isIncome=0&isAdd=0&id={{item.id}}"
/>
</t-cell-group>
<t-fab icon="add" bind:click="handleClick" aria-label="新增账户"/>