diff --git a/pages/bill/bill.vue b/pages/bill/bill.vue index 15a24da..e6eaa01 100644 --- a/pages/bill/bill.vue +++ b/pages/bill/bill.vue @@ -5,21 +5,53 @@ title="我的账单" > - - - - 支 + + + + + {{ currentYear }}年 + - - 收 + + + + + + + 选择年份 + + + + + + {{ year }}年 + + + + + + + + + 支出 + + + 收入 + @@ -75,6 +107,10 @@ export default { bills: [], isRefreshing: false, loadStatus: 'more', // u-loadmore 状态 + // 年份筛选相关 + currentYear: 2025, + years: [2025, 2024, 2023, 2022, 2021], + showYearPicker: false }; }, onLoad(options) { @@ -86,6 +122,19 @@ export default { this.currentTab = tab; this.loadBills(); }, + + // 切换年份选择器显示 + toggleYearPicker() { + this.showYearPicker = !this.showYearPicker; + }, + + // 选择年份 + selectYear(year) { + this.currentYear = year; + this.showYearPicker = false; + // 重新加载账单数据 + this.loadBills(); + }, loadBills() { // 模拟数据加载 @@ -160,24 +209,90 @@ export default { padding-top: 120rpx; /* 给导航栏留空间 */ } +.filter-bar { + display: flex; + justify-content: space-between; + align-items: center; + background: #fff; + padding: 24rpx 30rpx; + margin: 20rpx; + border-radius: 12rpx; + box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.05); +} + +/* 年份筛选 */ +.year-filter { + display: flex; + align-items: center; + gap: 8rpx; + font-size: 32rpx; + color: #333; + cursor: pointer; +} + +/* 支出/收入切换 */ .tab-bar { display: flex; - background: #fff; - margin: 0 20rpx; - border-radius: 12rpx; - overflow: hidden; - box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.05); + gap: 20rpx; +} - .tab-item { - flex: 1; - text-align: center; - padding: 20rpx 0; - font-size: 28rpx; - color: #666; - &.active { - color: #fff; - background: #007aff; - } +.tab-item { + padding: 12rpx 32rpx; + font-size: 28rpx; + border-radius: 24rpx; + color: #333; + background-color: #f5f5f5; + transition: all 0.2s ease; + &.active { + color: #fff; + background: #ff3b30; + } +} + +/* 自定义年份选择器样式 */ +.year-picker-popup { + background: #fff; + padding: 30rpx 0; +} + +.popup-header { + text-align: center; + padding: 20rpx 0; + border-bottom: 1rpx solid #f0f0f0; +} + +.popup-title { + font-size: 34rpx; + font-weight: 600; + color: #333; +} + +.year-list { + padding: 20rpx; +} + +.year-item { + font-size: 32rpx; + color: #666; + text-align: center; + padding: 24rpx; + border-radius: 12rpx; + margin-bottom: 16rpx; + background: #f5f5f5; + transition: all 0.2s ease; + + &:last-child { + margin-bottom: 0; + } + + &.active { + background: #ff3b30; + color: #fff; + } + + &:hover { + background: #ff5252; + color: #fff; } } @@ -201,7 +316,7 @@ export default { flex-direction: column; .bill-name { - font-size: 30rpx; + font-size: 28rpx; color: #2D2B2C; font-weight: 500; } @@ -219,7 +334,7 @@ export default { align-items: center; .amount { - font-size: 30rpx; + font-size: 28rpx; color: #F34038; margin-right: 10rpx; } diff --git a/pages/center/center.vue b/pages/center/center.vue index 188c0d9..d79ae78 100644 --- a/pages/center/center.vue +++ b/pages/center/center.vue @@ -64,25 +64,25 @@ - + 账单 - + 租赁资产 - + 水电缴费 - + 待付 diff --git a/pages/center/myLease.vue b/pages/center/myLease.vue index 9f5f64f..2fa0403 100644 --- a/pages/center/myLease.vue +++ b/pages/center/myLease.vue @@ -119,7 +119,7 @@ export default { flex-direction: column; height: 100vh; background: #f7f8fa; - padding-top: 175rpx; + padding-top: 120rpx; } .filter-bar { diff --git a/pages/unpaid/unpaid.vue b/pages/unpaid/unpaid.vue index e801ccd..c5b9c2d 100644 --- a/pages/unpaid/unpaid.vue +++ b/pages/unpaid/unpaid.vue @@ -1,335 +1,352 @@ + .empty { + margin-top: 200rpx; + text-align: center; + } + \ No newline at end of file diff --git a/pages/wae/wae.vue b/pages/wae/wae.vue index 9420fe9..1a73b08 100644 --- a/pages/wae/wae.vue +++ b/pages/wae/wae.vue @@ -1,336 +1,352 @@ + .empty { + margin-top: 200rpx; + text-align: center; + } + \ No newline at end of file