账户查看
This commit is contained in:
@@ -33,9 +33,9 @@ Page({
|
||||
}).then(res => {
|
||||
if (res.data){
|
||||
let incomeList = res.data.incomeList;
|
||||
let payList = res.data.incomeList;
|
||||
let expendBalance = res.data.expendBalance;
|
||||
let incomeBalance = res.data.incomeBalance;
|
||||
let payList = res.data.payList;
|
||||
let expendBalance = res.data.expendBalance ? res.data.expendBalance : 0;
|
||||
let incomeBalance = res.data.incomeBalance ? res.data.incomeBalance : 0;
|
||||
this.setData({
|
||||
incomeList,payList,expendBalance,incomeBalance
|
||||
})
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="space_box_no_padding font_big">
|
||||
<text class="t-color-expend">支出{{expendMoney}}</text>
|
||||
<text class="t-color-income">收入{{incomeMoney}}</text>
|
||||
<text class="t-color-expend">支出{{expendBalance}}</text>
|
||||
<text class="t-color-income">收入{{incomeBalance}}</text>
|
||||
</view>
|
||||
<view class="padding_box">
|
||||
<t-divider content="{{dateRangeText}}" bind:tap="handleCalendar"/>
|
||||
@@ -21,24 +21,24 @@
|
||||
<t-collapse-panel header="收入" value="{{0}}">
|
||||
<view wx:if="{{incomeList != null && incomeList.length > 0}}">
|
||||
<t-cell wx:for="{{incomeList}}" wx:key="index"
|
||||
title="{{item.title}}"
|
||||
description="{{item.dateTime}} • {{item.from}}"
|
||||
title="{{item.moneyName}}"
|
||||
description="{{item.date}}"
|
||||
align="top"
|
||||
image="/image/bill/4.png"
|
||||
note="+{{item.money}}"
|
||||
class="t-cell-{{item.type}}"
|
||||
image="{{item.moneyIcon}}"
|
||||
note="{{item.money}}"
|
||||
class="t-cell-{{item.billType}}"
|
||||
url="{{'/pages/bill/index?id=' + item.id}}"
|
||||
/>
|
||||
</view>
|
||||
</t-collapse-panel>
|
||||
<t-collapse-panel header="支出" value="{{1}}">
|
||||
<t-cell wx:for="{{payList}}" wx:key="index"
|
||||
title="{{item.title}}"
|
||||
description="{{item.dateTime}} • {{item.from}}"
|
||||
title="{{item.moneyName}}"
|
||||
description="{{item.date}}"
|
||||
align="top"
|
||||
image="/image/bill/4.png"
|
||||
note="-{{item.money}}"
|
||||
class="t-cell-{{item.type}}"
|
||||
image="{{item.moneyIcon}}"
|
||||
note="{{item.money}}"
|
||||
class="t-cell-{{item.billType}}"
|
||||
url="{{'/pages/bill/index?id=' + item.id}}"
|
||||
/>
|
||||
</t-collapse-panel>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<view class="space_box view_bg">
|
||||
<view class="inline_box font_large">
|
||||
<image src="https://tdesign.gtimg.com/site/miniprogram-doc/doc-actionsheet.png"/>
|
||||
{{name}}
|
||||
账单金额
|
||||
</view>
|
||||
<view class="{{money > 0 ? 't-color-income' : 't-color-expend'}} font_large">{{money > 0 ? "+" + money : money}}</view>
|
||||
</view>
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
const app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
cashAccountList : [
|
||||
{"name":"现金","money":"2000.00"},
|
||||
{"name":"银行卡","money":"30500.03"}
|
||||
],
|
||||
oweAccountList : [
|
||||
{"name":"信用卡","money":"-200.00"},
|
||||
],
|
||||
cashAccountList : [],
|
||||
oweAccountList : [],
|
||||
},
|
||||
onShow: function () {
|
||||
app.$api.getSettings().then(setting => {
|
||||
|
||||
Reference in New Issue
Block a user