feat(ui): 完成【版型切换】与【心率区间设置】页面 UI 重构及标准物料交付

This commit is contained in:
zhy200308
2026-08-17 15:43:15 +08:00
parent 0c7e12f89a
commit fa304292b4
40 changed files with 10137 additions and 0 deletions
@@ -0,0 +1,236 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>方案 B:Material 3 Expressive 旗舰居中流</title>
<style>
:root {
--md-primary: #3949AB;
--md-primary-container: #E8EAF6;
--md-on-primary-container: #1A237E;
--md-surface: #FFFFFF;
--md-surface-container: #F4F6F9;
--md-surface-container-high: #EEF2F7;
--md-secondary-container: #E0F2F1;
--md-secondary: #00796B;
--md-text-title: #1C1B1F;
--md-text-body: #49454F;
--md-outline: #79747E;
--md-divider: rgba(0,0,0,0.08);
--content-max-width: 780px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
background: #F1F4F8;
color: var(--md-text-title);
min-height: 100vh;
-webkit-font-smoothing: antialiased;
padding: 24px;
}
.device-wrapper {
width: 100%;
max-width: 1024px;
margin: 0 auto;
background: var(--md-surface);
border-radius: 24px;
border: 1px solid var(--md-divider);
box-shadow: 0 10px 30px rgba(0,0,0,0.06);
overflow: hidden;
}
.appbar {
height: 64px;
display: flex;
align-items: center;
padding: 0 24px;
background: var(--md-surface);
border-bottom: 1px solid var(--md-divider);
}
.btn-back {
width: 44px;
height: 44px;
border-radius: 22px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.15s ease;
}
.btn-back:hover { background: var(--md-surface-container); }
.btn-back svg { width: 22px; height: 22px; fill: var(--md-text-title); }
.appbar-title {
font-size: 20px;
font-weight: 600;
margin-left: 12px;
}
.content-area {
padding: 40px 24px 52px;
max-width: var(--content-max-width);
margin: 0 auto;
}
.hero-box {
text-align: center;
margin-bottom: 36px;
}
.hero-icon {
width: 68px;
height: 68px;
margin: 0 auto 16px;
border-radius: 22px;
background: #E8EAF6;
display: flex;
align-items: center;
justify-content: center;
}
.hero-icon svg { width: 34px; height: 34px; fill: var(--md-primary); }
.hero-title {
font-size: 22px;
font-weight: 700;
color: var(--md-text-title);
margin-bottom: 8px;
}
.hero-sub {
font-size: 14px;
color: var(--md-text-body);
}
.stack-cards {
display: flex;
flex-direction: column;
gap: 16px;
margin-bottom: 36px;
}
.m3-card {
background: var(--md-surface-container);
border: 2px solid transparent;
border-radius: 20px;
padding: 24px 28px;
display: flex;
align-items: flex-start;
gap: 20px;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
user-select: none;
}
.m3-card:hover {
background: var(--md-surface-container-high);
}
.m3-card.is-selected {
background: var(--md-primary-container);
border-color: var(--md-primary);
box-shadow: 0 4px 16px rgba(57, 73, 171, 0.12);
}
.radio-box {
width: 22px;
height: 22px;
border-radius: 50%;
border: 2px solid #8E8A93;
display: flex;
align-items: center;
justify-content: center;
margin-top: 2px;
flex-shrink: 0;
background: transparent;
transition: all 0.2s ease;
}
.m3-card.is-selected .radio-box {
border-color: var(--md-primary);
}
.radio-inner {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--md-primary);
opacity: 0;
transform: scale(0.3);
transition: all 0.2s ease;
}
.m3-card.is-selected .radio-inner {
opacity: 1;
transform: scale(1);
}
.card-content { flex: 1; }
.card-title {
font-size: 18px;
font-weight: 600;
color: var(--md-text-title);
margin-bottom: 6px;
}
.m3-card.is-selected .card-title {
color: var(--md-on-primary-container);
}
.card-desc {
font-size: 14px;
color: var(--md-text-body);
line-height: 1.6;
}
.action-box {
display: flex;
justify-content: stretch;
}
.btn-m3-tonal {
width: 100%;
height: 52px;
background: var(--md-secondary-container);
color: var(--md-secondary);
border: none;
border-radius: 26px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.15s ease;
letter-spacing: 0.02em;
}
.btn-m3-tonal:hover {
background: #C8E6C9;
transform: translateY(-1px);
}
</style>
</head>
<body>
<div class="device-wrapper">
<header class="appbar">
<div class="btn-back"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></div>
<h1 class="appbar-title">选择版型</h1>
</header>
<main class="content-area">
<div class="hero-box">
<div class="hero-icon">
<svg viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 14H7v-4h4v4zm0-6H7V7h4v4zm6 6h-4v-8h4v8z"/></svg>
</div>
<h2 class="hero-title">选择版型</h2>
<p class="hero-sub">请选择适合您使用场景的版型,后续可在设置中更改</p>
</div>
<div class="stack-cards" id="m3Group">
<div class="m3-card" onclick="setM3(this)">
<div class="radio-box"><div class="radio-inner"></div></div>
<div class="card-content">
<h3 class="card-title">专业版</h3>
<p class="card-desc">为专业场馆管理员设计,布局固定专业化,核心数据字段默认全开,开箱即用</p>
</div>
</div>
<div class="m3-card is-selected" onclick="setM3(this)">
<div class="radio-box"><div class="radio-inner"></div></div>
<div class="card-content">
<h3 class="card-title">自定义功能版</h3>
<p class="card-desc">高度可配置,所有高级功能开放,适合研究员和高级用户</p>
</div>
</div>
</div>
<div class="action-box">
<button class="btn-m3-tonal">确定</button>
</div>
</main>
</div>
<script>
function setM3(el) {
document.querySelectorAll('.m3-card').forEach(c => c.classList.remove('is-selected'));
el.classList.add('is-selected');
}
</script>
</body>
</html>