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

@@ -6,7 +6,7 @@
/* ── hero ── */
.input-hero {
padding: 48px 32px 36px;
padding: var(--tk-gap-2xl) var(--tk-gap-xl) 36px;
display: flex;
flex-direction: column;
align-items: center;
@@ -17,21 +17,21 @@
width: 88px;
height: 88px;
border-radius: $r-lg;
background: $pri-l;
margin-bottom: 20px;
background: var(--tk-pri-l);
margin-bottom: var(--tk-section-gap);
}
.input-hero-icon-text {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: var(--tk-font-hero);
font-weight: bold;
color: $pri;
color: var(--tk-pri);
}
.input-hero-title {
@include section-title;
font-size: var(--tk-font-num-lg);
margin-bottom: 8px;
margin-bottom: var(--tk-gap-xs);
}
.input-hero-sub {
@@ -44,18 +44,18 @@
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 24px 20px;
border: 1px dashed $pri;
margin: 0 var(--tk-gap-lg) var(--tk-section-gap);
border: 1px dashed var(--tk-pri);
&:active {
opacity: 0.7;
opacity: var(--tk-touch-feedback-opacity);
}
}
.input-sync-entry-text {
font-size: var(--tk-font-body-lg);
font-weight: 600;
color: $pri;
color: var(--tk-pri);
}
.input-sync-entry-hint {
@@ -65,14 +65,14 @@
/* ── card ── */
.input-card {
margin: 0 24px 20px;
margin: 0 var(--tk-gap-lg) var(--tk-section-gap);
}
.input-card-header {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 20px;
margin-bottom: var(--tk-section-gap);
}
.input-card-indicator {
@@ -104,7 +104,7 @@
align-items: center;
background: $bg;
border-radius: $r-sm;
padding: 22px 24px;
padding: 22px var(--tk-gap-lg);
}
.input-picker-value {
@@ -127,7 +127,7 @@
font-size: var(--tk-font-body-lg);
font-weight: bold;
color: $tx;
margin-bottom: 16px;
margin-bottom: var(--tk-gap-md);
display: block;
}
@@ -135,7 +135,7 @@
.input-bp-group {
display: flex;
align-items: flex-end;
gap: 12px;
gap: var(--tk-gap-sm);
}
.input-bp-field {
@@ -146,14 +146,14 @@
font-size: var(--tk-font-body);
color: $tx2;
display: block;
margin-bottom: 8px;
margin-bottom: var(--tk-gap-xs);
}
.input-bp-divider {
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 20px;
padding-bottom: var(--tk-section-gap);
gap: 6px;
}
@@ -174,7 +174,7 @@
.input-field-box {
background: $bg;
border-radius: $r-sm;
padding: 20px 24px;
padding: var(--tk-section-gap) var(--tk-gap-lg);
font-size: var(--tk-font-body-lg);
color: $tx;
@include serif-number;
@@ -195,16 +195,16 @@
/* ── submit ── */
.input-submit {
background: $pri;
background: var(--tk-pri);
border-radius: $r;
padding: 26px;
text-align: center;
margin: 48px 24px 0;
margin: var(--tk-gap-2xl) var(--tk-gap-lg) 0;
box-shadow: $shadow-md;
transition: opacity 0.2s;
&:active {
opacity: 0.85;
opacity: var(--tk-touch-feedback-opacity);
}
}