小程序端:设计系统收敛与排版层级修复

问题:88 个 wxss 里散落大量硬编码颜色/字号/字重,无法统一调整;
部分正文对比度不达 WCAG AA(4.5:1);组件触摸目标偏小。

改动:
- 硬编码颜色收敛到语义 token(颜色统一走 design token,不再散落字面值)
- 修正全站字号阶梯:正文 ≥12px、角标 ≥11px;字重只用 400/500/600/700
- 组件触摸目标提升到 ≥44px,并补交互反馈
- 首页补氛围层次、强化排版层级

验证(本轮实测):
- UI 契约门禁 18/18 PASS(含 wxml 结构、wxss 组件选择器、token 显式值断言)
- 声明级体检 88/88 通过(全部 wxss 声明合法)

交付物:artifacts/miniapp-design-v2-preview.html
This commit is contained in:
WorkBuddy
2026-09-23 01:06:46 +08:00
parent 825fd41ee4
commit 269adf1fed
81 changed files with 5064 additions and 3533 deletions
+70 -70
View File
@@ -1,127 +1,127 @@
.page {
min-height: 100vh;
background: #FFF8F7;
min-height:100vh;
background:var(--color-primary-lighter);
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx;
background: #fff;
border-bottom: 1rpx solid #f0f0f0;
display:flex;
align-items:center;
justify-content:space-between;
padding:32rpx;
background:var(--color-bg-card);
border-bottom:1rpx solid var(--color-divider);
}
.title {
font-size: 36rpx;
font-weight: bold;
color: #1A1A1A;
font-size:36rpx;
font-weight:bold;
color:var(--color-text-strong);
}
.unread-badge {
font-size: 24rpx;
color: #E96B6B;
padding: 8rpx 16rpx;
background: #FFF3F2;
border-radius: 20rpx;
font-size:24rpx;
color:var(--color-primary-strong);
padding:8rpx 16rpx;
background:var(--color-primary-light);
border-radius:20rpx;
}
.unread-badge.empty {
color: #999;
background: #f5f5f5;
color:var(--color-text-tertiary);
background:var(--color-bg-subtle);
}
.list {
height: calc(100vh - 120rpx);
height:calc(100vh - 120rpx);
}
.notif-item {
display: flex;
align-items: flex-start;
padding: 28rpx 32rpx;
background: #fff;
border-bottom: 1rpx solid #f5f5f5;
gap: 16rpx;
display:flex;
align-items:flex-start;
padding:28rpx 32rpx;
background:var(--color-bg-card);
border-bottom:1rpx solid var(--color-divider);
gap:16rpx;
}
.notif-item.unread {
background: #FFFAF9;
background:var(--color-primary-lighter);
}
.notif-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #E96B6B;
flex-shrink: 0;
margin-top: 12rpx;
width:12rpx;
height:12rpx;
border-radius:50%;
background:var(--color-primary);
flex-shrink:0;
margin-top:12rpx;
}
.notif-content {
flex: 1;
min-width: 0;
flex:1;
min-width:0;
}
.notif-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8rpx;
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:8rpx;
}
.notif-title {
font-size: 28rpx;
font-weight: bold;
color: #1A1A1A;
font-size:28rpx;
font-weight:bold;
color:var(--color-text-strong);
}
.notif-time {
font-size: 22rpx;
color: #999;
font-size:24rpx;
color:var(--color-text-tertiary);
}
.notif-body {
font-size: 24rpx;
color: #666;
line-height: 1.6;
margin-bottom: 12rpx;
font-size:24rpx;
color:var(--color-text-secondary);
line-height:1.6;
margin-bottom:12rpx;
}
.notif-type-tag {
display: inline-block;
font-size: 20rpx;
padding: 4rpx 12rpx;
border-radius: 12rpx;
background: #F5F5F5;
color: #999;
display:inline-block;
font-size:24rpx;
padding:4rpx 12rpx;
border-radius:12rpx;
background:var(--color-bg-subtle);
color:var(--color-text-tertiary);
}
.notif-type-tag.match { background: #E8F5E9; color: #2E7D32; }
.notif-type-tag.review { background: #E3F2FD; color: #1565C0; }
.notif-type-tag.activity { background: #FFF3E0; color: #E65100; }
.notif-type-tag.risk { background: #FFEBEE; color: #C62828; }
.notif-type-tag.account { background: #F3E5F5; color: #6A1B9A; }
.notif-type-tag.match { background:var(--color-success-light); color:var(--color-success-strong); }
.notif-type-tag.review { background:var(--color-info-light); color:var(--color-info-strong); }
.notif-type-tag.activity { background:var(--color-warning-light); color:var(--color-warning-strong); }
.notif-type-tag.risk { background:var(--color-primary-light); color:var(--color-danger-strong); }
.notif-type-tag.account { background:var(--color-accent-purple-light); color:var(--color-accent-purple-strong); }
.empty {
text-align: center;
padding: 120rpx 40rpx;
text-align:center;
padding:120rpx 40rpx;
}
.empty-img {
width: 160rpx;
height: 160rpx;
margin-bottom: 24rpx;
opacity: 0.5;
width:160rpx;
height:160rpx;
margin-bottom:24rpx;
opacity:0.5;
}
.empty-text {
display: block;
font-size: 28rpx;
color: #999;
display:block;
font-size:28rpx;
color:var(--color-text-tertiary);
}
.loading {
text-align: center;
padding: 40rpx;
color: #999;
text-align:center;
padding:40rpx;
color:var(--color-text-tertiary);
}