feat(ui): 完成【版型切换】与【心率区间设置】页面 UI 重构及标准物料交付
This commit is contained in:
@@ -0,0 +1,282 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>方案 A:Pro Studio 旗舰极简并排卡片</title>
|
||||
<style>
|
||||
:root {
|
||||
--primary: #2B3A8C;
|
||||
--primary-light: #EEF2FF;
|
||||
--primary-border: #3E52BA;
|
||||
--accent-confirm: #0D7A68;
|
||||
--accent-confirm-bg: #E3F6F2;
|
||||
--accent-confirm-hover: #D0EFE9;
|
||||
--bg-page: #F8FAFC;
|
||||
--bg-card: #FFFFFF;
|
||||
--text-main: #0F172A;
|
||||
--text-muted: #64748B;
|
||||
--text-sub: #94A3B8;
|
||||
--border-subtle: #E2E8F0;
|
||||
--border-card: #CBD5E1;
|
||||
--shadow-card: 0 1px 3px rgba(15, 23, 42, 0.03), 0 6px 16px -4px rgba(15, 23, 42, 0.05);
|
||||
--shadow-selected: 0 0 0 1.5px var(--primary-border), 0 8px 24px -4px rgba(43, 58, 140, 0.12);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
||||
background: var(--bg-page);
|
||||
color: var(--text-main);
|
||||
min-height: 100vh;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
padding: 24px;
|
||||
}
|
||||
.device-wrapper {
|
||||
width: 100%;
|
||||
max-width: 1040px;
|
||||
margin: 0 auto;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.07);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.appbar {
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 28px;
|
||||
background: #FFFFFF;
|
||||
border-bottom: 1px solid #F1F5F9;
|
||||
}
|
||||
.btn-back {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #F8FAFC;
|
||||
border: 1px solid #E2E8F0;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.btn-back:hover { background: #EEF2F6; border-color: #CBD5E1; }
|
||||
.btn-back svg { width: 20px; height: 20px; fill: var(--text-main); }
|
||||
.appbar-title {
|
||||
font-size: 19px;
|
||||
font-weight: 600;
|
||||
margin-left: 16px;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--text-main);
|
||||
}
|
||||
.content-area {
|
||||
padding: 44px 32px 56px;
|
||||
max-width: 880px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
.hero-section {
|
||||
text-align: center;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
.hero-icon-box {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin: 0 auto 16px;
|
||||
border-radius: 16px;
|
||||
background: #F1F5F9;
|
||||
border: 1px solid #E2E8F0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.hero-icon-box svg { width: 28px; height: 28px; fill: var(--primary); }
|
||||
.hero-h1 {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
letter-spacing: -0.02em;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.hero-p {
|
||||
font-size: 14.5px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.5;
|
||||
}
|
||||
.dual-cards-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20px;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
.pro-card {
|
||||
background: #FFFFFF;
|
||||
border: 1.5px solid var(--border-subtle);
|
||||
border-radius: 16px;
|
||||
padding: 28px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
box-shadow: var(--shadow-card);
|
||||
user-select: none;
|
||||
}
|
||||
.pro-card:hover {
|
||||
border-color: #94A3B8;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
.pro-card.is-selected {
|
||||
background: #FAFBFF;
|
||||
border-color: var(--primary-border);
|
||||
box-shadow: var(--shadow-selected);
|
||||
}
|
||||
.card-top-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.card-tag {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
padding: 3px 9px;
|
||||
border-radius: 6px;
|
||||
background: #F1F5F9;
|
||||
color: #475569;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
.pro-card.is-selected .card-tag {
|
||||
background: var(--primary-light);
|
||||
color: var(--primary);
|
||||
}
|
||||
.radio-ring {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--border-card);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #FFFFFF;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.pro-card.is-selected .radio-ring {
|
||||
border-color: var(--primary);
|
||||
background: var(--primary);
|
||||
}
|
||||
.radio-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #FFFFFF;
|
||||
opacity: 0;
|
||||
transform: scale(0.3);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.pro-card.is-selected .radio-dot {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
.card-h2 {
|
||||
font-size: 19px;
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
margin-bottom: 10px;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.pro-card.is-selected .card-h2 {
|
||||
color: var(--primary);
|
||||
}
|
||||
.card-desc {
|
||||
font-size: 14px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.6;
|
||||
flex: 1;
|
||||
}
|
||||
.actions-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.btn-primary-confirm {
|
||||
min-width: 320px;
|
||||
height: 48px;
|
||||
padding: 0 32px;
|
||||
background: var(--accent-confirm-bg);
|
||||
color: var(--accent-confirm);
|
||||
border: 1px solid rgba(13, 122, 104, 0.2);
|
||||
border-radius: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
.btn-primary-confirm:hover {
|
||||
background: var(--accent-confirm-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(13, 122, 104, 0.12);
|
||||
}
|
||||
.btn-primary-confirm:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
</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-section">
|
||||
<div class="hero-icon-box">
|
||||
<svg viewBox="0 0 24 24"><path d="M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z"/></svg>
|
||||
</div>
|
||||
<h2 class="hero-h1">选择版型</h2>
|
||||
<p class="hero-p">请选择适合您使用场景的版型,后续可在设置中更改</p>
|
||||
</div>
|
||||
|
||||
<div class="dual-cards-grid" id="editionGroup">
|
||||
<!-- 卡片 1:专业版 -->
|
||||
<div class="pro-card" onclick="setEdition(this)">
|
||||
<div class="card-top-row">
|
||||
<span class="card-tag">场馆预设</span>
|
||||
<div class="radio-ring"><div class="radio-dot"></div></div>
|
||||
</div>
|
||||
<h3 class="card-h2">专业版</h3>
|
||||
<p class="card-desc">为专业场馆管理员设计,布局固定专业化,核心数据字段默认全开,开箱即用</p>
|
||||
</div>
|
||||
|
||||
<!-- 卡片 2:自定义功能版 -->
|
||||
<div class="pro-card is-selected" onclick="setEdition(this)">
|
||||
<div class="card-top-row">
|
||||
<span class="card-tag">高阶定制</span>
|
||||
<div class="radio-ring"><div class="radio-dot"></div></div>
|
||||
</div>
|
||||
<h3 class="card-h2">自定义功能版</h3>
|
||||
<p class="card-desc">高度可配置,所有高级功能开放,适合研究员和高级用户</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions-row">
|
||||
<button class="btn-primary-confirm">确定</button>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function setEdition(el) {
|
||||
document.querySelectorAll('.pro-card').forEach(c => c.classList.remove('is-selected'));
|
||||
el.classList.add('is-selected');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user