fix(mp): 修正 design token 字号对齐原型 + ContentCard margin prop

- tokens.scss: 修正字号 token 对齐 18 份原型稿 fontSize 统计
  --tk-font-h1: 26→28px, --tk-font-h2: 24→22px
  --tk-font-body-lg: 28→18px, --tk-font-body: 22→16px
  --tk-font-body-sm: 16→14px
  elder-mode 同步重新计算比例系数
- ContentCard: 新增 margin prop ('none'|'md'),margin-bottom
  从 CSS 类移至 inline style,支持列表容器内无间距模式
- Profile 页: 用户卡片添加 profile-user-card flex 布局
  菜单组/积分卡片使用 margin="none",修复布局对齐
- Login 页: SCSS 全部改为 design token 引用
This commit is contained in:
iven
2026-05-17 12:48:38 +08:00
parent 6841c45846
commit 551d19d921
6 changed files with 107 additions and 90 deletions

View File

@@ -1,8 +1,7 @@
@import '../../styles/variables.scss';
@import '../../styles/mixins.scss';
// 登录页使用原型精确数值,不走 design token
// 原型参考docs/design/mp-01-login.html
// 登录页 — 全部使用 design token,原型参考 docs/design/mp-01-login.html
.login-page {
min-height: 100vh;
@@ -40,14 +39,14 @@
.login-title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 28px;
font-size: var(--tk-font-h1);
font-weight: 700;
color: $tx;
margin-bottom: 8px;
}
.login-subtitle {
font-size: 14px;
font-size: var(--tk-font-body-sm);
color: $tx3;
}
@@ -56,7 +55,7 @@
height: 56px;
background: $card;
border: 1.5px solid $bd;
border-radius: 16px;
border-radius: $r;
display: flex;
align-items: center;
padding: 0 16px;
@@ -66,17 +65,17 @@
.login-input {
flex: 1;
height: 100%;
font-size: 16px;
font-size: var(--tk-font-body);
color: $tx;
}
.login-placeholder {
color: $tx3;
font-size: 16px;
font-size: var(--tk-font-body);
}
.login-eye {
font-size: 14px;
font-size: var(--tk-font-body-sm);
color: var(--tk-pri);
font-weight: 500;
padding: 6px 0;
@@ -86,7 +85,7 @@
/* ─── 登录按钮 ─── */
.login-submit {
height: 54px;
border-radius: 16px;
border-radius: $r;
background: var(--tk-pri);
@include flex-center;
margin-top: 12px;
@@ -99,7 +98,7 @@
}
.login-submit-text {
font-size: 18px;
font-size: var(--tk-font-body-lg);
font-weight: 600;
color: $white;
}
@@ -119,14 +118,14 @@
}
.login-divider-text {
font-size: 12px;
font-size: var(--tk-font-cap);
color: $tx3;
}
/* ─── 微信登录 ─── */
.login-wechat-btn {
height: 54px;
border-radius: 16px;
border-radius: $r;
background: $wechat;
display: flex;
align-items: center;
@@ -140,13 +139,13 @@
}
.login-wechat-icon {
font-size: 16px;
font-size: var(--tk-font-body);
color: $white;
font-weight: bold;
}
.login-wechat-text {
font-size: 18px;
font-size: var(--tk-font-body-lg);
font-weight: 600;
color: $white;
}
@@ -161,9 +160,9 @@
height: 54px;
background: var(--tk-pri);
color: $white;
font-size: 18px;
font-size: var(--tk-font-body-lg);
font-weight: 600;
border-radius: 16px;
border-radius: $r;
border: none;
@include flex-center;
box-shadow: 0 4px 16px rgba($pri, 0.25);
@@ -198,14 +197,14 @@
}
.agreement-check-mark {
font-size: 14px;
font-size: var(--tk-font-body-sm);
color: $white;
font-weight: bold;
line-height: 1;
}
.agreement-text {
font-size: 12px;
font-size: var(--tk-font-cap);
color: $tx3;
line-height: 1.8;
}
@@ -220,7 +219,7 @@
text-align: center;
padding: 12px;
border: 1px dashed $bd;
border-radius: 12px;
border-radius: $r-sm;
margin-top: 16px;
&:active {
@@ -229,6 +228,6 @@
}
.login-dev-btn-text {
font-size: 13px;
font-size: var(--tk-font-cap);
color: $tx3;
}