|
|
@@ -0,0 +1,351 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="zh-CN">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8" />
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
+ <title>mobile-h5 环境标识 Demo</title>
|
|
|
+ <style>
|
|
|
+ :root {
|
|
|
+ --bg: #f1f5f9;
|
|
|
+ --card: #ffffff;
|
|
|
+ --text: #0f172a;
|
|
|
+ --muted: #64748b;
|
|
|
+ }
|
|
|
+ * { box-sizing: border-box; }
|
|
|
+ body {
|
|
|
+ margin: 0;
|
|
|
+ font-family: "PingFang SC", "Helvetica Neue", system-ui, sans-serif;
|
|
|
+ background: var(--bg);
|
|
|
+ color: var(--text);
|
|
|
+ padding: 28px 20px 48px;
|
|
|
+ }
|
|
|
+ h1 {
|
|
|
+ margin: 0 0 8px;
|
|
|
+ font-size: 22px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .subtitle {
|
|
|
+ text-align: center;
|
|
|
+ color: var(--muted);
|
|
|
+ font-size: 14px;
|
|
|
+ margin: 0 0 20px;
|
|
|
+ }
|
|
|
+ .env-toggle {
|
|
|
+ display: flex;
|
|
|
+ gap: 8px;
|
|
|
+ justify-content: center;
|
|
|
+ margin-bottom: 24px;
|
|
|
+ }
|
|
|
+ .env-toggle button {
|
|
|
+ border: 1px solid #cbd5e1;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 999px;
|
|
|
+ padding: 8px 16px;
|
|
|
+ font-size: 13px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .env-toggle button.active {
|
|
|
+ border-color: #059669;
|
|
|
+ background: #ecfdf5;
|
|
|
+ color: #065f46;
|
|
|
+ font-weight: 650;
|
|
|
+ }
|
|
|
+ .cards {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 20px;
|
|
|
+ justify-content: center;
|
|
|
+ max-width: 1100px;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+ .card {
|
|
|
+ width: 300px;
|
|
|
+ background: var(--card);
|
|
|
+ border-radius: 16px;
|
|
|
+ border: 1px solid #e2e8f0;
|
|
|
+ overflow: hidden;
|
|
|
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
|
|
|
+ }
|
|
|
+ .card-image {
|
|
|
+ padding: 16px;
|
|
|
+ background: #f8fafc;
|
|
|
+ }
|
|
|
+ .card-body {
|
|
|
+ padding: 14px 16px 18px;
|
|
|
+ }
|
|
|
+ .card-body h3 {
|
|
|
+ margin: 0 0 6px;
|
|
|
+ font-size: 15px;
|
|
|
+ }
|
|
|
+ .card-body p {
|
|
|
+ margin: 0;
|
|
|
+ font-size: 13px;
|
|
|
+ color: var(--muted);
|
|
|
+ line-height: 1.5;
|
|
|
+ }
|
|
|
+ .phone {
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 28px;
|
|
|
+ overflow: hidden;
|
|
|
+ border: 2px solid #1e293b;
|
|
|
+ background: #f0fdf4;
|
|
|
+ box-shadow: 0 12px 32px rgba(15, 41, 30, 0.18);
|
|
|
+ }
|
|
|
+ .phone-rel { position: relative; }
|
|
|
+ .status-bar {
|
|
|
+ height: 28px;
|
|
|
+ background: linear-gradient(135deg, #10b981, #059669);
|
|
|
+ }
|
|
|
+ .header {
|
|
|
+ background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
|
+ color: #ecfdf5;
|
|
|
+ padding: 14px 16px 18px;
|
|
|
+ }
|
|
|
+ .brand-row {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ gap: 8px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
+ .brand {
|
|
|
+ font-size: 11px;
|
|
|
+ opacity: 0.78;
|
|
|
+ letter-spacing: 0.04em;
|
|
|
+ }
|
|
|
+ .hello {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+ .meta {
|
|
|
+ margin-top: 8px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 11px;
|
|
|
+ opacity: 0.82;
|
|
|
+ }
|
|
|
+ .logout {
|
|
|
+ border: 1px solid rgba(6, 95, 70, 0.35);
|
|
|
+ border-radius: 6px;
|
|
|
+ padding: 2px 8px;
|
|
|
+ color: #065f46;
|
|
|
+ background: rgba(236, 253, 245, 0.35);
|
|
|
+ }
|
|
|
+ .body { padding: 12px; }
|
|
|
+ .banner {
|
|
|
+ height: 72px;
|
|
|
+ border-radius: 12px;
|
|
|
+ background: linear-gradient(120deg, #86efac, #34d399);
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .panel {
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 14px;
|
|
|
+ padding: 12px;
|
|
|
+ border: 1px solid #d1fae5;
|
|
|
+ }
|
|
|
+ .panel-title {
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 650;
|
|
|
+ color: #0f291e;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(4, 1fr);
|
|
|
+ gap: 8px;
|
|
|
+ }
|
|
|
+ .cell {
|
|
|
+ aspect-ratio: 1;
|
|
|
+ border-radius: 10px;
|
|
|
+ background: #ecfdf5;
|
|
|
+ border: 1px solid #bbf7d0;
|
|
|
+ }
|
|
|
+ .badge {
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 10px;
|
|
|
+ font-weight: 700;
|
|
|
+ padding: 3px 8px;
|
|
|
+ border-radius: 999px;
|
|
|
+ line-height: 1.2;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+ .badge.local {
|
|
|
+ background: #fef3c7;
|
|
|
+ color: #92400e;
|
|
|
+ border: 1px solid #f59e0b;
|
|
|
+ }
|
|
|
+ .badge.test {
|
|
|
+ background: #dbeafe;
|
|
|
+ color: #1e40af;
|
|
|
+ border: 1px solid #3b82f6;
|
|
|
+ }
|
|
|
+ .stripe {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 11px;
|
|
|
+ font-weight: 700;
|
|
|
+ padding: 6px 10px;
|
|
|
+ letter-spacing: 0.04em;
|
|
|
+ }
|
|
|
+ .stripe.local {
|
|
|
+ background: #f59e0b;
|
|
|
+ color: #451a03;
|
|
|
+ }
|
|
|
+ .stripe.test {
|
|
|
+ background: #3b82f6;
|
|
|
+ color: #eff6ff;
|
|
|
+ }
|
|
|
+ .float-badge {
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ bottom: 14px;
|
|
|
+ box-shadow: 0 4px 14px rgba(0,0,0,0.18);
|
|
|
+ }
|
|
|
+ .note {
|
|
|
+ max-width: 720px;
|
|
|
+ margin: 28px auto 0;
|
|
|
+ font-size: 13px;
|
|
|
+ color: var(--muted);
|
|
|
+ text-align: center;
|
|
|
+ line-height: 1.6;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <h1>mobile-h5 环境标识 Demo</h1>
|
|
|
+ <p class="subtitle">仅 local / test 显示;prod 完全无标识。可切换下方配色预览。</p>
|
|
|
+
|
|
|
+ <div class="env-toggle">
|
|
|
+ <button type="button" class="active" data-env="local" onclick="setDemoEnv('local')">本地 local</button>
|
|
|
+ <button type="button" data-env="test" onclick="setDemoEnv('test')">测试 test</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="cards">
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-image">
|
|
|
+ <div class="phone">
|
|
|
+ <div class="status-bar"></div>
|
|
|
+ <div class="header">
|
|
|
+ <div class="brand-row">
|
|
|
+ <div class="brand">中科兴皖 · 移动工作台</div>
|
|
|
+ <span class="badge local demo-env-badge">本地</span>
|
|
|
+ </div>
|
|
|
+ <div class="hello">您好,张三</div>
|
|
|
+ <div class="meta">
|
|
|
+ <span>市场经理 · 合肥</span>
|
|
|
+ <span class="logout">退出登录</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="body">
|
|
|
+ <div class="banner"></div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="panel-title">功能菜单</div>
|
|
|
+ <div class="grid">
|
|
|
+ <div class="cell"></div><div class="cell"></div>
|
|
|
+ <div class="cell"></div><div class="cell"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card-body">
|
|
|
+ <h3>A · 首页标题旁角标</h3>
|
|
|
+ <p>只在首页绿头区右侧显示「本地/测试」。轻量;离开首页后看不到。</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-image">
|
|
|
+ <div class="phone">
|
|
|
+ <div class="status-bar"></div>
|
|
|
+ <div class="stripe local demo-env-stripe">⚠ 本地联调环境 · 勿上传正式版</div>
|
|
|
+ <div class="header">
|
|
|
+ <div class="brand-row">
|
|
|
+ <div class="brand">中科兴皖 · 移动工作台</div>
|
|
|
+ </div>
|
|
|
+ <div class="hello">您好,张三</div>
|
|
|
+ <div class="meta">
|
|
|
+ <span>市场经理 · 合肥</span>
|
|
|
+ <span class="logout">退出登录</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="body">
|
|
|
+ <div class="banner"></div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="panel-title">功能菜单</div>
|
|
|
+ <div class="grid">
|
|
|
+ <div class="cell"></div><div class="cell"></div>
|
|
|
+ <div class="cell"></div><div class="cell"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card-body">
|
|
|
+ <h3>B · 顶部醒目色条(推荐)</h3>
|
|
|
+ <p>整页顶部固定色条 + 文案。一眼能辨认,上传前最不易漏看。</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-image">
|
|
|
+ <div class="phone phone-rel">
|
|
|
+ <div class="status-bar"></div>
|
|
|
+ <div class="header">
|
|
|
+ <div class="brand-row">
|
|
|
+ <div class="brand">中科兴皖 · 移动工作台</div>
|
|
|
+ </div>
|
|
|
+ <div class="hello">您好,张三</div>
|
|
|
+ <div class="meta">
|
|
|
+ <span>市场经理 · 合肥</span>
|
|
|
+ <span class="logout">退出登录</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="body">
|
|
|
+ <div class="banner"></div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="panel-title">功能菜单</div>
|
|
|
+ <div class="grid">
|
|
|
+ <div class="cell"></div><div class="cell"></div>
|
|
|
+ <div class="cell"></div><div class="cell"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span class="badge local float-badge demo-env-badge">本地</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card-body">
|
|
|
+ <h3>C · 全局角落浮标</h3>
|
|
|
+ <p>所有页面右下角常驻小标签。跨页可见,但可能与底部按钮重叠。</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p class="note">
|
|
|
+ 配色约定:本地 = 琥珀橙;测试 = 蓝色;生产 = 不显示任何标识。<br />
|
|
|
+ 打开交互版可选方案:<code>http://localhost:60039</code>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ function setDemoEnv(env) {
|
|
|
+ document.querySelectorAll('.env-toggle button').forEach(function (btn) {
|
|
|
+ btn.classList.toggle('active', btn.getAttribute('data-env') === env)
|
|
|
+ })
|
|
|
+ var isLocal = env === 'local'
|
|
|
+ document.querySelectorAll('.demo-env-badge').forEach(function (el) {
|
|
|
+ el.classList.toggle('local', isLocal)
|
|
|
+ el.classList.toggle('test', !isLocal)
|
|
|
+ el.textContent = isLocal ? '本地' : '测试'
|
|
|
+ })
|
|
|
+ document.querySelectorAll('.demo-env-stripe').forEach(function (el) {
|
|
|
+ el.classList.toggle('local', isLocal)
|
|
|
+ el.classList.toggle('test', !isLocal)
|
|
|
+ el.textContent = isLocal
|
|
|
+ ? '⚠ 本地联调环境 · 勿上传正式版'
|
|
|
+ : '⚠ 测试环境 · 非生产'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+</html>
|