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

@@ -3,13 +3,13 @@
.messages-page {
// PageShell 接管 min-height, background
padding: 20px 24px 100px;
padding-bottom: calc(100px + env(safe-area-inset-bottom));
padding: var(--tk-section-gap) var(--tk-page-padding) var(--tk-tabbar-space);
padding-bottom: calc(var(--tk-tabbar-space) + env(safe-area-inset-bottom));
}
/* ─── 页头 ─── */
.messages-header {
margin-bottom: 20px;
margin-bottom: var(--tk-section-gap);
}
.messages-title {
@@ -26,7 +26,7 @@
background: $surface-alt;
border-radius: $r-sm;
padding: 3px;
margin-bottom: 12px;
margin-bottom: var(--tk-gap-sm);
}
.msg-segment-tab {
@@ -37,7 +37,7 @@
position: relative;
&:active {
opacity: 0.85;
opacity: var(--tk-touch-feedback-opacity);
}
}
@@ -82,13 +82,13 @@
.msg-list {
display: flex;
flex-direction: column;
gap: 8px;
gap: var(--tk-gap-xs);
}
/* ─── 咨询卡片 ─── */
.consult-card {
display: flex;
gap: 12px;
gap: var(--tk-gap-sm);
align-items: center;
// ContentCard 接管 background, border-radius, padding, box-shadow, active feedback
}
@@ -107,7 +107,7 @@
}
.consult-avatar-active {
background: $pri-l;
background: var(--tk-pri-l);
}
.consult-avatar-char {
@@ -118,7 +118,7 @@
}
.consult-avatar-active .consult-avatar-char {
color: $pri;
color: var(--tk-pri);
}
.consult-body {
@@ -130,7 +130,7 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
margin-bottom: var(--tk-gap-2xs);
&:last-child {
margin-bottom: 0;
@@ -156,7 +156,7 @@
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
margin-right: 8px;
margin-right: var(--tk-gap-xs);
}
.consult-badge {
@@ -178,7 +178,7 @@
/* ─── 通知卡片 ─── */
.notify-card {
display: flex;
gap: 12px;
gap: var(--tk-gap-sm);
align-items: flex-start;
// ContentCard 接管 background, border-radius, padding, box-shadow
}
@@ -203,8 +203,8 @@
.notify-type-appointment,
.notify-type-points {
background: $pri-l;
color: $pri;
background: var(--tk-pri-l);
color: var(--tk-pri);
}
.notify-type-alert {
@@ -227,7 +227,7 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
margin-bottom: var(--tk-gap-2xs);
}
.notify-title {
@@ -244,7 +244,7 @@
font-size: var(--tk-font-micro);
color: var(--tk-text-secondary);
flex-shrink: 0;
margin-left: 8px;
margin-left: var(--tk-gap-xs);
}
.notify-desc {
@@ -257,7 +257,7 @@
width: 8px;
height: 8px;
border-radius: $r-xs;
background: $pri;
background: var(--tk-pri);
flex-shrink: 0;
margin-top: 6px;
margin-top: var(--tk-gap-2xs);
}