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

@@ -105,43 +105,34 @@ async function saveProfile() {
</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; }
.status-bar { @include status-bar; }
.nav-bar {
display: flex;
align-items: center;
padding: 16rpx 40rpx 24rpx;
padding: $space-sm $space-xl $space-md;
}
.nav-back {
width: 88rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
&:active { opacity: 0.6; }
@include nav-back;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 36rpx;
font-size: $font-2xl;
font-weight: 600;
color: #2D1B1B;
color: $text;
}
.nav-save {
@@ -155,16 +146,16 @@ async function saveProfile() {
}
.save-text {
font-size: 28rpx;
font-size: $font-lg;
font-weight: 600;
color: #FF8C69;
color: $primary;
}
.avatar-section {
display: flex;
flex-direction: column;
align-items: center;
padding: 48rpx 0 32rpx;
padding: $space-2xl 0 $space-lg;
}
.avatar-wrap {
@@ -172,7 +163,7 @@ async function saveProfile() {
height: 160rpx;
border-radius: 50%;
border: 6rpx solid rgba(255, 255, 255, 0.5);
background: linear-gradient(135deg, #FF8C69, #FFB89A);
background: linear-gradient(135deg, $primary, #FFB89A);
display: flex;
align-items: center;
justify-content: center;
@@ -196,61 +187,61 @@ async function saveProfile() {
}
.avatar-hint {
font-size: 24rpx;
color: #BFB3B3;
margin-top: 16rpx;
font-size: $font-md;
color: $text-muted;
margin-top: $space-sm;
}
.form-card {
margin: 32rpx 40rpx 0;
background: #FFFFFF;
border-radius: 40rpx;
border: 2rpx solid #F0E0D6;
box-shadow: 4rpx 4rpx 12rpx rgba(45, 27, 27, 0.08);
margin: $space-lg $space-xl 0;
background: $surface;
border-radius: $radius-2xl;
border: 2rpx solid $border;
box-shadow: $shadow-md;
overflow: hidden;
}
.form-item {
display: flex;
align-items: center;
padding: 32rpx 40rpx;
padding: $space-lg $space-xl;
}
.form-label {
width: 120rpx;
font-size: 28rpx;
font-size: $font-lg;
font-weight: 500;
color: #2D1B1B;
color: $text;
flex-shrink: 0;
}
.form-input {
flex: 1;
font-size: 28rpx;
color: #2D1B1B;
font-size: $font-lg;
color: $text;
}
.tips-card {
margin: 32rpx 40rpx 0;
padding: 32rpx 40rpx;
background: #FFFFFF;
border-radius: 40rpx;
border: 2rpx solid #F0E0D6;
box-shadow: 4rpx 4rpx 12rpx rgba(45, 27, 27, 0.08);
margin: $space-lg $space-xl 0;
padding: $space-lg $space-xl;
background: $surface;
border-radius: $radius-2xl;
border: 2rpx solid $border;
box-shadow: $shadow-md;
}
.tips-title {
font-size: 28rpx;
font-size: $font-lg;
font-weight: 600;
color: #2D1B1B;
color: $text;
display: block;
margin-bottom: 16rpx;
margin-bottom: $space-sm;
}
.tips-text {
font-size: 24rpx;
color: #8B7E7E;
font-size: $font-md;
color: $text-sec;
display: block;
margin-bottom: 8rpx;
margin-bottom: $space-xs;
}
</style>