Files
dukang/pages/user/04_餐券核销码页面_ccfa6298/code.html
T
2026-06-30 10:33:56 +08:00

234 lines
12 KiB
HTML

<!DOCTYPE html><html class="light" lang="zh-CN" style="width: 390px; height: 887px; overflow: hidden; position: relative;"><head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&amp;display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&amp;family=Inter:wght@400;500;600&amp;family=Be+Vietnam+Pro:wght@400;500&amp;display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&amp;display=swap" rel="stylesheet">
<!-- CSS and Tailwind Config included as per instructions -->
<script id="tailwind-config">
tailwind.config = {
darkMode: "class",
theme: {
extend: {
"colors": {
"on-tertiary-fixed-variant": "#3f4943",
"inverse-surface": "#2f3130",
"secondary-fixed-dim": "#e9c349",
"outline-variant": "#e2bebc",
"inverse-primary": "#ffb3ae",
"error-container": "#ffdad6",
"on-surface-variant": "#5a413f",
"primary-fixed": "#ffdad7",
"on-primary": "#ffffff",
"on-primary-fixed-variant": "#910817",
"on-background": "#1a1c1b",
"primary-container": "#a61d24",
"heritage-red": "#A61D24",
"on-error": "#ffffff",
"ink-black": "#1A1A1A",
"surface-variant": "#e3e2e0",
"tertiary-fixed-dim": "#bec9c2",
"surface-bright": "#faf9f7",
"on-secondary-container": "#745c00",
"surface-container-high": "#e9e8e6",
"inverse-on-surface": "#f1f1ef",
"surface-tint": "#b3272c",
"on-primary-fixed": "#410004",
"surface-container-lowest": "#ffffff",
"surface-container": "#efeeec",
"status-blue": "#2A6EBB",
"primary": "#820012",
"on-surface": "#1a1c1b",
"on-error-container": "#93000a",
"tertiary": "#37413b",
"surface": "#faf9f7",
"on-secondary-fixed": "#241a00",
"secondary": "#735c00",
"success-green": "#2D6A4F",
"secondary-fixed": "#ffe088",
"on-tertiary-container": "#c2cdc6",
"on-secondary": "#ffffff",
"on-tertiary-fixed": "#141e19",
"surface-container-highest": "#e3e2e0",
"subtle-gray": "#999999",
"surface-container-low": "#f4f3f1",
"secondary-container": "#fed65b",
"tertiary-container": "#4e5852",
"on-primary-container": "#ffb9b4",
"background": "#faf9f7",
"outline": "#8d706e",
"aged-amber": "#FFBF00",
"primary-fixed-dim": "#ffb3ae",
"surface-dim": "#dadad8",
"on-secondary-fixed-variant": "#574500",
"tertiary-fixed": "#dae5dd",
"on-tertiary": "#ffffff",
"error": "#ba1a1a"
},
"borderRadius": {
"DEFAULT": "0.25rem",
"lg": "0.5rem",
"xl": "0.75rem",
"full": "9999px"
},
"spacing": {
"stack-lg": "32px",
"stack-sm": "4px",
"stack-md": "16px",
"gutter-card": "12px",
"base": "8px",
"margin-page": "20px"
},
"fontFamily": {
"headline-lg": ["Manrope"],
"headline-lg-mobile": ["Manrope"],
"headline-xl": ["Manrope"],
"label-md": ["Inter"],
"coupon-amount": ["Manrope"],
"headline-md": ["Manrope"],
"body-md": ["Be Vietnam Pro"],
"body-lg": ["Be Vietnam Pro"]
},
"fontSize": {
"headline-lg": ["24px", {"lineHeight": "32px", "fontWeight": "600"}],
"headline-lg-mobile": ["20px", {"lineHeight": "28px", "fontWeight": "600"}],
"headline-xl": ["32px", {"lineHeight": "40px", "letterSpacing": "-0.02em", "fontWeight": "700"}],
"label-md": ["12px", {"lineHeight": "16px", "letterSpacing": "0.05em", "fontWeight": "500"}],
"coupon-amount": ["28px", {"lineHeight": "28px", "fontWeight": "700"}],
"headline-md": ["18px", {"lineHeight": "26px", "fontWeight": "600"}],
"body-md": ["14px", {"lineHeight": "20px", "fontWeight": "400"}],
"body-lg": ["16px", {"lineHeight": "24px", "fontWeight": "400"}]
}
},
},
}
</script>
<style>
.material-symbols-outlined {
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.qr-gradient {
background: linear-gradient(135deg, rgba(166, 29, 36, 0.03) 0%, rgba(255, 191, 0, 0.03) 100%);
}
.ticket-notch {
position: relative;
}
.ticket-notch::before, .ticket-notch::after {
content: '';
position: absolute;
top: 50%;
width: 12px;
height: 24px;
background: #faf9f7;
transform: translateY(-50%);
border-radius: 12px;
}
.ticket-notch::before { left: -6px; border-radius: 0 12px 12px 0; }
.ticket-notch::after { right: -6px; border-radius: 12px 0 0 12px; }
</style>
</head>
<body class="bg-surface-bright text-on-surface font-body-md min-h-screen flex flex-col">
<!-- TopAppBar (Mapped from Shared Components) -->
<header class="fixed top-0 left-0 w-full z-50 flex justify-between items-center px-margin-page h-16 bg-surface dark:bg-surface-dim shadow-[0px_4px_20px_rgba(166,29,36,0.05)]">
<div class="flex items-center gap-4">
<button class="active:scale-95 transition-transform">
<span class="material-symbols-outlined text-primary dark:text-primary-fixed">arrow_back</span>
</button>
<h1 class="font-headline-lg-mobile text-headline-lg-mobile font-bold text-heritage-red">出示核销码</h1>
</div>
<button class="hover:opacity-80 transition-opacity active:scale-95 transition-transform">
</button>
</header>
<main class="flex-1 mt-20 px-margin-page pb-32 space-y-gutter-card">
<!-- CouponSummaryCard -->
<section class="ticket-notch bg-primary-container text-on-primary-container p-6 rounded-xl shadow-lg flex flex-col items-center justify-center relative overflow-hidden">
<div class="absolute top-0 right-0 p-4 opacity-10">
<span class="material-symbols-outlined text-[80px]" style="font-variation-settings: 'FILL' 1;">confirmation_number</span>
</div>
<div class="flex items-baseline gap-1">
<span class="font-headline-md text-headline-md">¥</span>
<h2 class="font-coupon-amount text-coupon-amount">500.00</h2>
</div>
<p class="mt-2 font-label-md text-label-md bg-aged-amber text-on-secondary-container px-3 py-1 rounded-full">好客权益核销额度</p>
</section>
<!-- QRCodePanel -->
<section class="bg-surface-container-lowest p-8 rounded-xl shadow-[0px_4px_20px_rgba(166,29,36,0.05)] flex flex-col items-center qr-gradient border border-outline-variant/10">
<div class="bg-white p-4 rounded-xl shadow-sm mb-6 border border-surface-container">
<div class="w-[200px] h-[200px] flex items-center justify-center bg-surface-container-low rounded-lg relative overflow-hidden">
<img class="w-full h-full object-cover" data-alt="A clean, professional 2D high-resolution QR code design isolated on a white background, featuring a subtle geometric red and amber logo at its center. The code is framed by a minimalist rounded border and represents a premium digital voucher for a high-end liquor and dining service in China. The lighting is even and studio-quality, emphasizing clarity and scannability within a luxury UI environment." src="https://lh3.googleusercontent.com/aida-public/AB6AXuCiDbOCWd-QjMSq_3jl9M7Vb6Hk0IPh_9xXH1_rFE4DzjTBV67coi83noUpIJvPfQ50VmCm8QPJJRSkoJHvTWPWvgNC8-52TQ4_2cT7wR44cwSPSh2hRH5bo4OGpmTybQxbcyfowBUGGM1438NLdmSp-yz6-tvbIkaBVIivs34eK0pUsGJzXm644wIQsJx4rXTYifV5HOBUW-hmdesUWqLDZeUK-hhMBA-7ERjEtfCmgUlZLqniiivEBeCfKfJc33vAMhW6N8Ypy-s">
<!-- Scanline Animation effect -->
<div class="absolute top-0 left-0 w-full h-[2px] bg-heritage-red/40 blur-[1px]" id="scanline" style="top: 136px;"></div>
</div>
</div>
<div class="flex flex-col items-center gap-2">
<div class="flex items-center gap-2 text-on-surface-variant font-label-md text-label-md">
<span class="material-symbols-outlined text-heritage-red scale-75">schedule</span>
<span id="timer" class="">核销码将在 00:00 后失效</span>
</div>
<button class="text-heritage-red font-headline-md text-headline-md font-bold py-2 px-4 hover:bg-primary-container/5 rounded-lg transition-colors active:scale-95" id="refresh-btn">
点击刷新
</button>
</div>
</section>
<!-- SafetyNotice -->
<section class="bg-secondary-container/10 border border-secondary-container/20 p-4 rounded-xl flex gap-4 items-start">
<div class="bg-aged-amber/20 p-2 rounded-lg">
<span class="material-symbols-outlined text-aged-amber" style="font-variation-settings: 'FILL' 1;">gpp_maybe</span>
</div>
<div>
<h3 class="font-headline-md text-headline-md text-on-secondary-fixed-variant mb-1">安全提示</h3>
<p class="font-body-md text-body-md text-on-surface-variant leading-relaxed">请在核销前向店员确认核销金额,该码仅限一次性使用,切勿截图发送给他人。</p>
</div>
</section>
</main>
<!-- ActionButtons (Fixed Bottom) -->
<footer class="fixed bottom-0 left-0 w-full bg-surface-bright/80 backdrop-blur-md p-4 pb-safe border-t border-surface-container">
</footer>
<script>
// Micro-interactions and Timer Logic
document.addEventListener('DOMContentLoaded', () => {
const timerElement = document.getElementById('timer');
const scanline = document.getElementById('scanline');
const refreshBtn = document.getElementById('refresh-btn');
let timeLeft = 299; // 5 minutes in seconds
// Simple Countdown
const updateTimer = () => {
const minutes = Math.floor(timeLeft / 60);
const seconds = timeLeft % 60;
timerElement.innerText = `核销码将在 ${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')} 后失效`;
if (timeLeft > 0) timeLeft--;
};
const timerInterval = setInterval(updateTimer, 1000);
// Scanline Animation
let scanPos = 0;
const animateScan = () => {
scanPos += 1;
if (scanPos > 200) scanPos = 0;
scanline.style.top = scanPos + 'px';
requestAnimationFrame(animateScan);
};
animateScan();
// Refresh Interaction
refreshBtn.addEventListener('click', () => {
timeLeft = 299;
refreshBtn.classList.add('animate-pulse');
setTimeout(() => refreshBtn.classList.remove('animate-pulse'), 1000);
});
});
</script>
<div id="snapdom-sandbox" data-snapdom-sandbox="true" aria-hidden="true" style="position: absolute; left: -9999px; top: -9999px; width: 0px; height: 0px; overflow: hidden;"></div>
</body></html>