refactor: UI/UX 全面重构 — 设计系统统一

设计系统:
- uni.scss 扩展:间距/圆角/字体/阴影/动画 token 体系
- 新建 styles/mixins.scss:20+ 公共 mixin

页面重构(12 个页面):
- 首页/记账/统计/账单/个人中心/预算/分类管理
- 群组管理/通知中心/管理员/用户管理/编辑资料

所有硬编码替换为设计 token:
- 颜色:#FFF8F0→$bg, #FFFFFF→$surface, #FF8C69→$primary 等
- 间距:40rpx→$space-xl, 24rpx→$space-md 等
- 字体:28rpx→$font-lg, 24rpx→$font-md 等
- 圆角:20rpx→$radius-lg, 40rpx→$radius-2xl 等
- 阴影:统一使用 $shadow-md/$shadow-sm

重复样式提取为 mixin:
- page-base, sticky-header, nav-bar, card, modal-mask
- tabs, tab, state-box, shimmer, flex-center 等
This commit is contained in:
wangxiaogang
2026-06-06 22:37:46 +08:00
parent a35689cdda
commit 4f42f2c342
16 changed files with 1116 additions and 1030 deletions

View File

@@ -245,60 +245,36 @@ onPullDownRefresh(() => {
</script>
<style lang="scss" scoped>
@import '@/styles/mixins.scss';
.page {
min-height: 100vh;
background: #FFF8F0;
padding: 0 0 180rpx;
@include page-base;
}
.header-fixed {
position: sticky;
top: 0;
z-index: 100;
background: #FFF8F0;
@include sticky-header;
}
.status-bar {
background: #FFF8F0;
@include status-bar;
}
.page-title {
display: block;
text-align: center;
font-size: 36rpx;
font-weight: 600;
color: #2D1B1B;
padding: 16rpx 0 24rpx;
@include page-title;
}
.tabs-wrap {
display: flex;
align-items: center;
@include tabs-wrap;
justify-content: center;
margin: 0 0 24rpx;
gap: 16rpx;
margin: 0 0 $space-md;
}
.tabs {
display: inline-flex;
background: #FFF0E6;
border-radius: 24rpx;
padding: 8rpx;
@include tabs;
}
.tab {
padding: 16rpx 40rpx;
border-radius: 20rpx;
font-size: 28rpx;
color: #8B7E7E;
transition: all 0.2s;
&.active {
background: #FFFFFF;
color: #FF8C69;
font-weight: 600;
box-shadow: 2rpx 2rpx 8rpx rgba(45, 27, 27, 0.06);
}
@include tab;
}
.filter-btn {
@@ -306,104 +282,99 @@ onPullDownRefresh(() => {
align-items: center;
gap: 6rpx;
padding: 12rpx 20rpx;
background: #FFF0E6;
border-radius: 20rpx;
border: 2rpx solid #F0E0D6;
background: $surface-warm;
border-radius: $radius-lg;
border: 2rpx solid $border;
&.active {
border-color: #FF8C69;
background: #FFE8E0;
border-color: $primary;
background: $primary-light;
}
&:active { opacity: 0.7; }
}
.filter-btn-text {
font-size: 24rpx;
color: #8B7E7E;
.active & { color: #FF8C69; }
font-size: $font-md;
color: $text-sec;
.active & { color: $primary; }
}
.filter-stats {
display: flex;
gap: 24rpx;
padding: 0 40rpx 16rpx;
gap: $space-md;
padding: 0 $space-xl $space-sm;
}
.filter-stats-text {
font-size: 24rpx;
font-size: $font-md;
font-family: 'Fredoka', sans-serif;
color: #8B7E7E;
color: $text-sec;
}
.tx-list { padding: 0 40rpx; }
.tx-list { padding: 0 $space-xl; }
.date-group {
margin-bottom: 24rpx;
margin-bottom: $space-md;
}
.group-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16rpx 0;
border-bottom: 1rpx solid #F0E0D6;
margin-bottom: 8rpx;
padding: $space-sm 0;
border-bottom: 1rpx solid $border;
margin-bottom: $space-xs;
}
.group-date {
font-size: 26rpx;
font-size: $font-base;
font-weight: 600;
color: #2D1B1B;
color: $text;
}
.group-total {
font-family: 'Fredoka', sans-serif;
font-size: 24rpx;
color: #8B7E7E;
font-size: $font-md;
color: $text-sec;
&.expense { color: #2D1B1B; }
&.expense { color: $text; }
}
.skeleton-item {
display: flex;
align-items: center;
padding: 28rpx 0;
gap: 24rpx;
gap: $space-md;
}
.skeleton-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
gap: $space-xs;
}
.loading-more {
text-align: center;
padding: 32rpx 0;
padding: $space-lg 0;
}
.loading-text { font-size: 24rpx; color: #BFB3B3; }
.loading-text { font-size: $font-md; color: $text-muted; }
.empty {
text-align: center;
padding: 120rpx 0;
}
.empty-text { font-size: 28rpx; color: #BFB3B3; }
.empty-text { font-size: $font-lg; color: $text-muted; }
.state-box {
display: flex;
flex-direction: column;
align-items: center;
@include state-box;
justify-content: center;
gap: 16rpx;
padding: 120rpx 0;
}
.state-text {
font-size: 28rpx;
color: #BFB3B3;
@include state-text;
}
</style>