配置
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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="新增账户"/>
|
||||
|
||||
Reference in New Issue
Block a user