fix(miniprogram): 对齐设计原型 — 移除渐变头部+体征数值内联+卡片布局
- 首页:移除渐变头部改为平铺背景,铃铛图标替代消息按钮 - 首页:体征数值与单位内联显示(同一行 baseline 对齐) - 健康页:标题改为"健康数据",整体样式贴近原型紧凑风格 - 我的页:移除渐变头部改为平铺卡片,积分/打卡分两个独立卡片 - 我的页:菜单使用 emoji 图标替代文字图标,间距更紧凑
This commit is contained in:
@@ -4,32 +4,32 @@
|
||||
.health-page {
|
||||
min-height: 100vh;
|
||||
background: $bg;
|
||||
padding-bottom: calc(120px + env(safe-area-inset-bottom));
|
||||
padding: 20px 16px 100px;
|
||||
padding-bottom: calc(100px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* ─── 页头 ─── */
|
||||
.health-header {
|
||||
padding: 24px 32px 8px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.health-title {
|
||||
font-family: 'Georgia', 'Times New Roman', serif;
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: $tx;
|
||||
}
|
||||
|
||||
/* ─── 类型 Tab ─── */
|
||||
.vital-tabs {
|
||||
display: flex;
|
||||
padding: 12px 24px;
|
||||
gap: 12px;
|
||||
padding: 0 0 16px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.vital-tab {
|
||||
flex: 1;
|
||||
height: $tab-h;
|
||||
border-radius: $r;
|
||||
height: 40px;
|
||||
border-radius: 12px;
|
||||
background: $surface-alt;
|
||||
@include flex-center;
|
||||
position: relative;
|
||||
@@ -48,73 +48,74 @@
|
||||
}
|
||||
|
||||
.vital-tab-text {
|
||||
font-size: 26px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: $tx2;
|
||||
}
|
||||
|
||||
.vital-tab-dot {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: $wrn;
|
||||
}
|
||||
|
||||
/* ─── 录入区 ─── */
|
||||
.input-section {
|
||||
margin: 0 24px 24px;
|
||||
margin-bottom: 12px;
|
||||
background: $card;
|
||||
border-radius: $r;
|
||||
padding: 24px;
|
||||
padding: 16px;
|
||||
box-shadow: $shadow-sm;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.input-label {
|
||||
font-size: 26px;
|
||||
color: $tx;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
color: $tx3;
|
||||
display: block;
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.input-field {
|
||||
height: 56px;
|
||||
background: $bg;
|
||||
border: 2px solid $bd;
|
||||
border-radius: $r-sm;
|
||||
padding: 0 20px;
|
||||
border-radius: 12px;
|
||||
padding: 0 16px;
|
||||
font-family: 'Georgia', 'Times New Roman', serif;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: $tx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.input-ref {
|
||||
font-size: 22px;
|
||||
color: $tx2;
|
||||
font-size: 13px;
|
||||
color: $tx3;
|
||||
display: block;
|
||||
margin-top: 12px;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
/* ─── 血糖时段选择 ─── */
|
||||
.period-group {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.period-btn {
|
||||
flex: 1;
|
||||
height: $btn-primary-h;
|
||||
border-radius: $r-sm;
|
||||
height: 48px;
|
||||
border-radius: 12px;
|
||||
background: $surface-alt;
|
||||
@include flex-center;
|
||||
|
||||
@@ -132,53 +133,68 @@
|
||||
}
|
||||
|
||||
.period-btn-text {
|
||||
font-size: 26px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: $tx2;
|
||||
}
|
||||
|
||||
/* ─── 保存按钮 ─── */
|
||||
.save-btn {
|
||||
@include btn-primary;
|
||||
margin-top: 24px;
|
||||
border-radius: $r;
|
||||
width: 100%;
|
||||
height: 52px;
|
||||
border-radius: 14px;
|
||||
background: $pri;
|
||||
@include flex-center;
|
||||
margin-top: 12px;
|
||||
|
||||
&:active {
|
||||
opacity: 0.85;
|
||||
}
|
||||
}
|
||||
|
||||
.save-btn-text {
|
||||
font-size: 28px;
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* ─── 趋势图 ─── */
|
||||
.trend-section {
|
||||
margin: 0 24px 24px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@include section-title;
|
||||
}
|
||||
|
||||
.trend-empty {
|
||||
background: $card;
|
||||
border-radius: $r;
|
||||
padding: 36px;
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
box-shadow: $shadow-sm;
|
||||
}
|
||||
|
||||
.trend-empty-text {
|
||||
font-size: 24px;
|
||||
font-size: 14px;
|
||||
color: $tx2;
|
||||
}
|
||||
|
||||
.trend-chart {
|
||||
background: $card;
|
||||
border-radius: $r;
|
||||
padding: 24px;
|
||||
padding: 16px;
|
||||
box-shadow: $shadow-sm;
|
||||
}
|
||||
|
||||
.trend-bars {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
height: 200px;
|
||||
gap: 8px;
|
||||
height: 120px;
|
||||
background: $bg;
|
||||
border-radius: 12px;
|
||||
padding: 12px 8px;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.trend-bar-col {
|
||||
@@ -191,10 +207,10 @@
|
||||
}
|
||||
|
||||
.trend-bar {
|
||||
width: 100%;
|
||||
max-width: 40px;
|
||||
width: 28px;
|
||||
border-radius: 6px 6px 0 0;
|
||||
min-height: 16px;
|
||||
min-height: 8px;
|
||||
opacity: 0.8;
|
||||
|
||||
&.trend-bar-normal {
|
||||
background: $pri;
|
||||
@@ -206,22 +222,23 @@
|
||||
}
|
||||
|
||||
.trend-bar-label {
|
||||
font-size: 22px;
|
||||
color: $tx2;
|
||||
margin-top: 8px;
|
||||
font-size: 11px;
|
||||
color: $tx3;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
/* ─── BLE 设备卡片 ─── */
|
||||
.device-section {
|
||||
margin: 0 24px 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.device-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
background: $card;
|
||||
border-radius: $r;
|
||||
padding: 24px;
|
||||
padding: 16px;
|
||||
box-shadow: $shadow-sm;
|
||||
|
||||
&:active {
|
||||
@@ -230,19 +247,16 @@
|
||||
}
|
||||
|
||||
.device-icon {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: $r-sm;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 12px;
|
||||
background: $pri-l;
|
||||
@include flex-center;
|
||||
margin-right: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.device-icon-text {
|
||||
font-size: 26px;
|
||||
font-weight: bold;
|
||||
color: $pri;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.device-info {
|
||||
@@ -251,31 +265,29 @@
|
||||
}
|
||||
|
||||
.device-name {
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: $tx;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.device-desc {
|
||||
font-size: 22px;
|
||||
color: $tx2;
|
||||
font-size: 13px;
|
||||
color: $acc;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.device-arrow {
|
||||
font-size: 32px;
|
||||
font-size: 14px;
|
||||
color: $tx3;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ─── 健康资讯入口 ─── */
|
||||
.article-entry {
|
||||
margin: 0 24px 24px;
|
||||
background: $card;
|
||||
border-radius: $r;
|
||||
padding: 24px;
|
||||
padding: 16px;
|
||||
box-shadow: $shadow-sm;
|
||||
|
||||
&:active {
|
||||
@@ -284,7 +296,7 @@
|
||||
}
|
||||
|
||||
.article-entry-text {
|
||||
font-size: 26px;
|
||||
color: $pri;
|
||||
font-size: 15px;
|
||||
color: $tx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ export default function Health() {
|
||||
<View className='health-page'>
|
||||
{/* 页头 */}
|
||||
<View className='health-header'>
|
||||
<Text className='health-title'>健康</Text>
|
||||
<Text className='health-title'>健康数据</Text>
|
||||
</View>
|
||||
|
||||
{/* 类型 Tab */}
|
||||
|
||||
Reference in New Issue
Block a user