记账微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.8 KiB

1 week ago
<view class="container">
<!-- 顶部余额卡片 -->
<view class="balance-card">
<view class="balance-header">
<!-- <text class="balance-title">当前余额</text> -->
<text class="balance-title">本月收支</text>
<text class="balance-date">{{currentMonth}}</text>
</view>
<!-- <view class="balance-amount">¥ {{totalBalance}}</view> -->
<view class="balance-stats">
<view class="balance-item">
<text class="income-label">收入</text>
<text class="income-amount">¥ {{totalIncome}}</text>
</view>
<view class="balance-divider"></view>
<view class="balance-item">
<text class="expense-label">支出</text>
<text class="expense-amount">¥ {{totalExpense}}</text>
</view>
</view>
</view>
<!-- 近期记录 -->
<view class="records-section">
<view class="section-header">
<text class="section-title">近期记录</text>
<navigator url="/pages/statistics/statistics" class="see-all">查看全部</navigator>
</view>
<view class="records-list">
<view wx:for="{{recentRecords}}" wx:key="id" class="record-item">
<view class="record-icon {{item.type === 'in' ? 'income-icon' : 'expense-icon'}}">
<text class="iconfont icon-{{item.categoryIcon}}"></text>
</view>
<view class="record-details">
1 week ago
<view class="record-title">{{item.classificationName}}</view>
1 week ago
<view class="record-date">{{item.useDate}}</view>
</view>
<view class="record-amount {{item.type === 'in' ? 'income' : 'expense'}}">
{{item.type === 'in' ? '+' : '-'}}¥ {{item.money}}
</view>
</view>
<view wx:if="{{recentRecords.length === 0}}" class="no-records">
<text>暂无记录,开始添加吧~</text>
</view>
</view>
</view>
</view>