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

@@ -4,9 +4,10 @@
display: flex;
align-items: center;
justify-content: space-between;
height: var(--tk-touch-min);
height: 44px;
padding: 0 var(--tk-page-padding);
background: $bg;
border-bottom: 1px solid $bd-l;
z-index: 10;
&--sticky {
@@ -17,7 +18,7 @@
&__left {
display: flex;
align-items: center;
gap: 8px;
gap: var(--tk-gap-xs);
min-width: 0;
flex: 1;
}
@@ -27,19 +28,19 @@
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
min-height: var(--tk-touch-min);
height: 44px;
}
&__back-icon {
font-size: 24px;
color: $tx;
font-size: var(--tk-font-h2);
color: var(--tk-pri);
line-height: 1;
}
&__title {
font-size: var(--tk-font-h1);
font-weight: 600;
font-family: Georgia, 'Times New Roman', serif;
font-size: var(--tk-font-nav);
font-weight: 700;
color: $tx;
overflow: hidden;
text-overflow: ellipsis;
@@ -49,7 +50,7 @@
&__right {
display: flex;
align-items: center;
gap: 12px;
gap: var(--tk-gap-sm);
flex-shrink: 0;
}
}

View File

@@ -11,7 +11,7 @@
display: flex;
align-items: center;
justify-content: center;
padding: 8px 20px;
padding: var(--tk-gap-xs) var(--tk-section-gap);
border-radius: $r-sm;
background: var(--tk-card-bg);
border: 1px solid $bd;

View File

@@ -6,16 +6,16 @@
&__input-wrap {
display: flex;
align-items: center;
gap: 8px;
gap: var(--tk-gap-xs);
background: var(--tk-card-bg);
border-radius: var(--tk-card-radius);
padding: 0 16px;
height: var(--tk-touch-min);
padding: 0 var(--tk-gap-md);
height: var(--tk-input-height);
box-shadow: $shadow-sm;
}
&__icon {
font-size: 16px;
font-size: var(--tk-font-body-sm);
flex-shrink: 0;
}