refactor(mp): CSS 变量主题 + 登录页改造 — UI 优化 Phase 0-2

Phase 0: 建立 design token 体系
- tokens.scss 新增 --tk-pri/--tk-pri-l/--tk-pri-d/--tk-shadow-btn/--tk-shadow-tab
- .doctor-mode 覆盖为靛蓝色系,.elder-mode 非线性放大字号
- variables.scss 新增医生端色彩 + 阴影变量

Phase 1: 组件库 + 页面全局替换
- 75 个页面 SCSS $pri → var(--tk-pri) 全量替换
- 11 个新 UI 组件(PrimaryButton/TabFilter/FormInput/ProgressRing 等)
- 8 个现有组件 SCSS 更新
- 18 个医生端页面 useElderClass → useDoctorClass
- PageHeader 匹配原型 NavBar 规格

Phase 2: 登录页重写
- Logo: 方形+ → 圆形渐变 H
- 登录方式: 纯微信 → 账号密码 + 微信一键登录
- 新增 credentialLogin API + store action
- 字号/间距严格匹配原型 mp-01-login.html
This commit is contained in:
iven
2026-05-16 21:29:13 +08:00
parent 1786f0d707
commit 95e219ad5a
124 changed files with 2306 additions and 1142 deletions

View File

@@ -5,8 +5,8 @@
// ContentCard 已接管sync-status-card/sync-result-card 背景/圆角/阴影
.sync-header {
background: $pri;
padding: 48px 32px 32px;
background: var(--tk-pri);
padding: var(--tk-gap-2xl) var(--tk-gap-xl) var(--tk-gap-xl);
color: $card;
}
@@ -16,17 +16,17 @@
}
.sync-section {
padding: 24px;
padding: var(--tk-gap-lg);
}
.sync-hero {
display: flex;
flex-direction: column;
align-items: center;
padding: 48px 24px;
padding: var(--tk-gap-2xl) var(--tk-gap-lg);
background: $card;
border-radius: $r;
margin-bottom: 24px;
margin-bottom: var(--tk-gap-lg);
box-shadow: $shadow-sm;
}
@@ -34,10 +34,10 @@
width: 80px;
height: 80px;
border-radius: 50%;
background: $pri-l;
background: var(--tk-pri-l);
@include flex-center;
margin-bottom: 20px;
color: $pri;
margin-bottom: var(--tk-section-gap);
color: var(--tk-pri);
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-num-lg);
font-weight: bold;
@@ -45,7 +45,7 @@
.sync-hero-title {
@include section-title;
margin-bottom: 8px;
margin-bottom: var(--tk-gap-xs);
}
.sync-hero-desc {
@@ -55,20 +55,20 @@
.sync-action {
@include flex-center;
background: $pri;
background: var(--tk-pri);
border-radius: $r-sm;
padding: 20px 40px;
margin: 12px 0;
padding: var(--tk-section-gap) var(--tk-gap-2xl);
margin: var(--tk-gap-sm) 0;
&--primary {
flex: 1;
background: $pri;
background: var(--tk-pri);
}
&--danger {
flex: 1;
background: $dan;
margin-left: 16px;
margin-left: var(--tk-gap-md);
}
}
@@ -79,7 +79,7 @@
}
.sync-device-list {
margin-top: 16px;
margin-top: var(--tk-gap-md);
}
.sync-section-title {
@@ -87,7 +87,7 @@
font-size: var(--tk-font-body-lg);
font-weight: bold;
color: $tx;
margin-bottom: 12px;
margin-bottom: var(--tk-gap-sm);
display: block;
}
@@ -97,8 +97,8 @@
align-items: center;
background: $card;
border-radius: $r-sm;
padding: 24px;
margin-bottom: 12px;
padding: var(--tk-gap-lg);
margin-bottom: var(--tk-gap-sm);
box-shadow: $shadow-sm;
}
@@ -127,14 +127,14 @@
.sync-status-card {
display: flex;
align-items: center;
margin-bottom: 16px;
margin-bottom: var(--tk-gap-md);
}
.sync-status-dot {
width: 16px;
height: 16px;
border-radius: 50%;
margin-right: 16px;
margin-right: var(--tk-gap-md);
background: $tx3;
&--connected {
@@ -150,8 +150,8 @@
.sync-readings-panel {
background: $card;
border-radius: $r-sm;
padding: 24px;
margin-bottom: 16px;
padding: var(--tk-gap-lg);
margin-bottom: var(--tk-gap-md);
box-shadow: $shadow-sm;
}
@@ -159,7 +159,7 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
padding: var(--tk-gap-sm) 0;
border-bottom: 1px solid $bd-l;
&:last-child {
@@ -175,13 +175,13 @@
.sync-reading-value {
font-size: var(--tk-font-body-lg);
font-weight: bold;
color: $pri;
color: var(--tk-pri);
@include serif-number;
}
.sync-readings-count {
display: block;
margin-top: 12px;
margin-top: var(--tk-gap-sm);
font-size: var(--tk-font-body);
color: var(--tk-text-secondary);
text-align: center;
@@ -189,12 +189,12 @@
.sync-actions-row {
display: flex;
gap: 12px;
gap: var(--tk-gap-sm);
}
.sync-error {
margin: 24px;
padding: 20px 24px;
margin: var(--tk-gap-lg);
padding: var(--tk-section-gap) var(--tk-gap-lg);
background: $dan-l;
border-radius: $r-sm;
}
@@ -218,7 +218,7 @@
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 24px;
margin-bottom: var(--tk-gap-lg);
box-shadow: $shadow-sm;
}
@@ -232,12 +232,12 @@
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-num-lg);
font-weight: bold;
margin-bottom: 16px;
margin-bottom: var(--tk-gap-md);
}
.sync-result-title {
@include section-title;
margin-bottom: 8px;
margin-bottom: var(--tk-gap-xs);
}
.sync-result-count {