Files
dukang/pages/user/14_好客权益专页_8bda47b8/code.html
T
2026-06-30 10:33:56 +08:00

359 lines
18 KiB
HTML

<!DOCTYPE html>
<html class="light" lang="zh-CN" style=""><head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
<title>杜康·好客中国 - 好客权益</title>
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&amp;family=Be+Vietnam+Pro:wght@400;500&amp;family=Inter:wght@400;500;600&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"/>
<!-- Shared Tailwind Config -->
<script id="tailwind-config">
tailwind.config = {
darkMode: "class",
theme: {
extend: {
"colors": {
"on-surface-variant": "#5a413f",
"surface-container-low": "#f4f3f1",
"secondary": "#735c00",
"surface-container-lowest": "#ffffff",
"secondary-container": "#fed65b",
"on-background": "#1a1c1b",
"inverse-on-surface": "#f1f1ef",
"on-secondary-fixed": "#241a00",
"on-tertiary-fixed": "#141e19",
"on-primary": "#ffffff",
"inverse-surface": "#2f3130",
"aged-amber": "#FFBF00",
"error": "#ba1a1a",
"on-primary-container": "#ffb9b4",
"tertiary-container": "#4e5852",
"surface-bright": "#faf9f7",
"on-secondary": "#ffffff",
"background": "#faf9f7",
"secondary-fixed": "#ffe088",
"on-error-container": "#93000a",
"success-green": "#2D6A4F",
"on-surface": "#1a1c1b",
"on-primary-fixed-variant": "#910817",
"on-tertiary-container": "#c2cdc6",
"subtle-gray": "#999999",
"on-secondary-fixed-variant": "#574500",
"on-primary-fixed": "#410004",
"primary-container": "#a61d24",
"surface-dim": "#dadad8",
"primary-fixed-dim": "#ffb3ae",
"on-tertiary-fixed-variant": "#3f4943",
"outline-variant": "#e2bebc",
"error-container": "#ffdad6",
"status-blue": "#2A6EBB",
"on-tertiary": "#ffffff",
"primary-fixed": "#ffdad7",
"surface-container": "#efeeec",
"on-secondary-container": "#745c00",
"surface-container-highest": "#e3e2e0",
"secondary-fixed-dim": "#e9c349",
"tertiary-fixed": "#dae5dd",
"outline": "#8d706e",
"surface-tint": "#b3272c",
"ink-black": "#1A1A1A",
"heritage-red": "#A61D24",
"tertiary-fixed-dim": "#bec9c2",
"surface-variant": "#e3e2e0",
"inverse-primary": "#ffb3ae",
"tertiary": "#37413b",
"on-error": "#ffffff",
"primary": "#820012",
"surface": "#faf9f7"
},
"borderRadius": {
"DEFAULT": "0.25rem",
"lg": "0.5rem",
"xl": "0.75rem",
"full": "9999px"
},
"spacing": {
"stack-lg": "32px",
"margin-page": "20px",
"gutter-card": "12px",
"base": "8px",
"stack-sm": "4px",
"stack-md": "16px"
},
"fontFamily": {
"headline-md": ["Manrope"],
"headline-lg": ["Manrope"],
"body-md": ["Be Vietnam Pro"],
"label-md": ["Inter"],
"headline-xl": ["Manrope"],
"body-lg": ["Be Vietnam Pro"],
"headline-lg-mobile": ["Manrope"],
"coupon-amount": ["Manrope"]
},
"fontSize": {
"headline-md": ["18px", {"lineHeight": "26px", "fontWeight": "600"}],
"headline-lg": ["24px", {"lineHeight": "32px", "fontWeight": "600"}],
"body-md": ["14px", {"lineHeight": "20px", "fontWeight": "400"}],
"label-md": ["12px", {"lineHeight": "16px", "letterSpacing": "0.05em", "fontWeight": "500"}],
"headline-xl": ["32px", {"lineHeight": "40px", "letterSpacing": "-0.02em", "fontWeight": "700"}],
"body-lg": ["16px", {"lineHeight": "24px", "fontWeight": "400"}],
"headline-lg-mobile": ["20px", {"lineHeight": "28px", "fontWeight": "600"}],
"coupon-amount": ["28px", {"lineHeight": "28px", "fontWeight": "700"}]
}
},
},
}
</script>
<style>
.material-symbols-outlined {
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
display: inline-block;
vertical-align: middle;
}
.coupon-notch-right {
position: absolute;
top: 50%;
right: -6px;
width: 12px;
height: 12px;
background-color: #faf9f7;
border-radius: 50%;
transform: translateY(-50%);
box-shadow: inset 1px 0 2px rgba(0,0,0,0.05);
}
body {
-webkit-tap-highlight-color: transparent;
background-color: #faf9f7;
}
.hero-texture {
background-image: radial-gradient(circle at 20% 30%, rgba(166, 29, 36, 0.05) 0%, transparent 50%),
radial-gradient(circle at 80% 70%, rgba(166, 29, 36, 0.03) 0%, transparent 50%);
}
</style>
</head>
<body class="font-body-md text-on-surface">
<!-- TopAppBar -->
<header class="fixed top-0 w-full z-50 bg-background dark:bg-background flex items-center justify-between px-margin-page h-14 w-full">
<div class="flex items-center gap-1 active:scale-95 transition-transform">
<span class="material-symbols-outlined text-primary" data-icon="location_on">location_on</span>
<span class="font-label-md text-label-md text-on-surface">洛阳市</span>
</div>
<h1 class="font-headline-md text-headline-md-mobile font-bold text-primary dark:text-inverse-primary absolute left-1/2 -translate-x-1/2">
好客权益
</h1>
<button class="flex items-center justify-center h-10 w-10 active:scale-95 transition-transform">
<span class="material-symbols-outlined text-on-surface-variant" data-icon="notifications">notifications</span>
</button>
</header>
<main class="pt-20 pb-32 px-margin-page space-y-stack-md">
<!-- Benefits Hero Card -->
<section class="relative overflow-hidden rounded-xl bg-surface-container-lowest border border-outline-variant/20 shadow-[0px_4px_20px_rgba(166,29,36,0.05)] p-stack-md hero-texture">
<div class="flex justify-between items-start mb-stack-md">
<div class="space-y-1">
<p class="font-label-md text-label-md text-on-surface-variant">当前好客权益余额</p>
<div class="flex items-baseline gap-1">
<span class="font-headline-xl text-primary">¥</span>
<span class="font-headline-xl text-primary text-[40px]">1,280.00</span>
</div>
</div>
<img alt="Dukang Logo" class="w-12 h-12 opacity-90 object-contain" src="https://lh3.googleusercontent.com/aida-public/AB6AXuCA8CB5k6AHjxBUOWxWS9fH8YbI3X4XAIs0UfAoj0m3G-MhuVkkRU6e5-hdA53Y5wsZYk9khbJfr4L7gUmGe2vdXCRo1MJrdqv1uwIYfoqsWzJ7i1OzMJmSkLZEUMnD7qY7PbXqZmgAIxDY5ll1bPGPVf8fS-uuBrJ3W2qiHUWEL5uncVvAUa4vJIu7AtjcMnwlSIIGdaErwmkWGZxUj5CSkwcPmXFmJ5eU-3BrQF_Bx1xt2TQAfYzf31fxudx-imHatOL-PhOKuDc"/>
</div>
<div class="flex items-center justify-between mt-6">
<button class="flex items-center gap-1 text-primary active:scale-95 transition-transform group">
<span class="font-label-md text-label-md font-semibold">查看权益明细</span>
<span class="material-symbols-outlined text-[16px] group-hover:translate-x-0.5 transition-transform" data-icon="chevron_right">chevron_right</span>
</button>
</div>
</section>
<!-- Quick Action Button -->
<section>
<button class="w-full bg-heritage-red text-on-primary py-4 rounded-xl font-headline-md text-headline-md flex items-center justify-center gap-2 shadow-[0px_4px_12px_rgba(166,29,36,0.2)] active:scale-[0.98] transition-all" onclick="handleStoreNavigation()">
<span class="material-symbols-outlined" data-icon="storefront" style="font-variation-settings: 'FILL' 1;">storefront</span>
去使用
</button>
</section>
<!-- Tabs for Filtering -->
<nav class="flex border-b border-outline-variant/10">
<button class="flex-1 py-3 font-label-md text-label-md border-b-2 transition-all text-primary font-bold border-primary" id="tab-available" onclick="switchTab('available')">待使用</button>
<button class="flex-1 py-3 font-label-md text-label-md transition-all text-on-surface-variant" id="tab-history" onclick="switchTab('history')">已用完/已过期</button>
</nav>
<!-- Benefit Cards List -->
<div class="space-y-4" id="content-available">
<!-- Card 1 -->
<div class="relative bg-white rounded-xl overflow-hidden shadow-[0px_4px_20px_rgba(166,29,36,0.05)] border border-outline-variant/5">
<div class="flex min-h-[128px]">
<!-- Left Side: Value -->
<div class="w-[100px] flex-shrink-0 bg-aged-amber flex flex-col items-center justify-center relative p-3 text-center">
<span class="font-label-md text-[10px] text-on-secondary-container/80 mb-1 uppercase tracking-wider">好客权益</span>
<div class="flex items-baseline gap-0.5">
<span class="text-sm font-bold text-on-secondary-container">¥</span>
<span class="font-coupon-amount text-2xl text-on-secondary-container">500</span>
</div>
<div class="coupon-notch-right"></div>
</div>
<!-- Right Side: Content -->
<div class="flex-1 p-4 flex flex-col justify-between overflow-hidden">
<div class="space-y-2">
<div class="flex justify-between items-start gap-2">
<h3 class="font-headline-md text-sm text-on-surface line-clamp-1 flex-1">杜康好客权益券</h3>
<span class="bg-primary/10 text-primary text-[10px] px-2 py-0.5 rounded-full font-bold whitespace-nowrap flex-shrink-0">永久有效</span>
</div>
<p class="font-label-md text-[11px] text-on-surface-variant line-clamp-1">适用于合作酒店餐饮消费</p>
<div class="space-y-1.5 pt-1">
<div class="flex justify-between text-[10px] font-label-md text-on-surface-variant">
<span>已使用 ¥200</span>
<span>未使用 ¥300</span>
</div>
<div class="w-full h-1.5 bg-surface-container rounded-full overflow-hidden">
<div class="h-full bg-aged-amber" style="width: 40%"></div>
</div>
</div>
</div>
<div class="flex justify-between items-center mt-3">
<span class="font-label-md text-[10px] text-subtle-gray/60 italic uppercase">NO. DK998231</span>
<button class="text-primary font-bold font-label-md text-xs active:opacity-60 transition-opacity">立即核销</button>
</div>
</div>
</div>
</div>
<!-- Card 2 -->
<div class="relative bg-white rounded-xl overflow-hidden shadow-[0px_4px_20px_rgba(166,29,36,0.05)] border border-outline-variant/5">
<div class="flex min-h-[128px]">
<!-- Left Side: Value -->
<div class="w-[100px] flex-shrink-0 bg-aged-amber flex flex-col items-center justify-center relative p-3 text-center">
<span class="font-label-md text-[10px] text-on-secondary-container/80 mb-1 uppercase tracking-wider">好客权益</span>
<div class="flex items-baseline gap-0.5">
<span class="text-sm font-bold text-on-secondary-container">¥</span>
<span class="font-coupon-amount text-2xl text-on-secondary-container">200</span>
</div>
<div class="coupon-notch-right"></div>
</div>
<!-- Right Side: Content -->
<div class="flex-1 p-4 flex flex-col justify-between overflow-hidden">
<div class="space-y-2">
<div class="flex justify-between items-start gap-2">
<h3 class="font-headline-md text-sm text-on-surface line-clamp-1 flex-1">洛阳宴会专供券</h3>
<span class="bg-primary/10 text-primary text-[10px] px-2 py-0.5 rounded-full font-bold whitespace-nowrap flex-shrink-0">永久有效</span>
</div>
<p class="font-label-md text-[11px] text-on-surface-variant line-clamp-1">指定门店可用,不设找零</p>
<div class="space-y-1.5 pt-1">
<div class="flex justify-between text-[10px] font-label-md text-on-surface-variant">
<span>已使用 ¥50</span>
<span>未使用 ¥150</span>
</div>
<div class="w-full h-1.5 bg-surface-container rounded-full overflow-hidden">
<div class="h-full bg-aged-amber" style="width: 25%"></div>
</div>
</div>
</div>
<div class="flex justify-between items-center mt-3">
<span class="font-label-md text-[10px] text-subtle-gray/60 italic uppercase">NO. DK881023</span>
<button class="text-primary font-bold font-label-md text-xs active:opacity-60 transition-opacity">立即核销</button>
</div>
</div>
</div>
</div>
<!-- Card 3 -->
<div class="relative bg-white rounded-xl overflow-hidden shadow-[0px_4px_20px_rgba(166,29,36,0.05)] border border-outline-variant/5">
<div class="flex min-h-[128px]">
<!-- Left Side: Value -->
<div class="w-[100px] flex-shrink-0 bg-aged-amber flex flex-col items-center justify-center relative p-3 text-center">
<span class="font-label-md text-[10px] text-on-secondary-container/80 mb-1 uppercase tracking-wider">好客权益</span>
<div class="flex items-baseline gap-0.5">
<span class="text-sm font-bold text-on-secondary-container">¥</span>
<span class="font-coupon-amount text-2xl text-on-secondary-container">580</span>
</div>
<div class="coupon-notch-right"></div>
</div>
<!-- Right Side: Content -->
<div class="flex-1 p-4 flex flex-col justify-between overflow-hidden">
<div class="space-y-2">
<div class="flex justify-between items-start gap-2">
<h3 class="font-headline-md text-sm text-on-surface line-clamp-1 flex-1">杜康·大师系列好客权益</h3>
<span class="bg-primary/10 text-primary text-[10px] px-2 py-0.5 rounded-full font-bold whitespace-nowrap flex-shrink-0">永久有效</span>
</div>
<p class="font-label-md text-[11px] text-on-surface-variant line-clamp-1">杜康村原址餐厅通用券</p>
<div class="space-y-1.5 pt-1">
<div class="flex justify-between text-[10px] font-label-md text-on-surface-variant">
<span>已使用 ¥0</span>
<span>未使用 ¥580</span>
</div>
<div class="w-full h-1.5 bg-surface-container rounded-full overflow-hidden">
<div class="h-full bg-aged-amber" style="width: 0%"></div>
</div>
</div>
</div>
<div class="flex justify-between items-center mt-3">
<span class="font-label-md text-[10px] text-subtle-gray/60 italic uppercase">NO. DK776512</span>
<button class="text-primary font-bold font-label-md text-xs active:opacity-60 transition-opacity">立即核销</button>
</div>
</div>
</div>
</div>
</div>
<div class="flex flex-col items-center justify-center py-20 space-y-4 hidden" id="content-history">
<span class="material-symbols-outlined text-[64px] text-outline-variant" data-icon="history_edu">history_edu</span>
<p class="font-body-md text-on-surface-variant">暂无过期或已使用的权益记录</p>
</div>
</main>
<!-- BottomNavBar -->
<nav class="fixed bottom-0 left-0 w-full flex justify-around items-center py-base px-2 bg-surface pb-safe z-50 rounded-t-xl shadow-[0px_-4px_20px_rgba(166,29,36,0.05)] border-t border-outline-variant/10"><a class="flex flex-col items-center justify-center text-on-surface-variant hover:bg-surface-container-low active:scale-90 transition-all duration-200" href="#">
<span class="material-symbols-outlined" data-icon="home">home</span>
<span class="font-label-md text-label-md">首页</span>
</a>
<a class="flex flex-col items-center justify-center text-on-surface-variant hover:bg-surface-container-low active:scale-90 transition-all duration-200" href="#">
<span class="material-symbols-outlined" data-icon="storefront">storefront</span>
<span class="font-label-md text-label-md">门店</span>
</a>
<a class="flex flex-col items-center justify-center text-primary font-bold hover:bg-surface-container-low active:scale-90 transition-all duration-200" href="#">
<span class="material-symbols-outlined" data-icon="card_giftcard" style="font-variation-settings: 'FILL' 1;">card_giftcard</span>
<span class="font-label-md text-label-md">好客权益</span>
</a>
<a class="flex flex-col items-center justify-center text-on-surface-variant hover:bg-surface-container-low active:scale-90 transition-all duration-200" href="#">
<span class="material-symbols-outlined" data-icon="person">person</span>
<span class="font-label-md text-label-md">我的</span>
</a></nav>
<script>
function switchTab(tab) {
const availableTab = document.getElementById('tab-available');
const historyTab = document.getElementById('tab-history');
const availableContent = document.getElementById('content-available');
const historyContent = document.getElementById('content-history');
if (tab === 'available') {
availableTab.classList.add('text-primary', 'font-bold', 'border-primary');
availableTab.classList.remove('text-on-surface-variant');
historyTab.classList.remove('text-primary', 'font-bold', 'border-primary');
historyTab.classList.add('text-on-surface-variant');
availableContent.classList.remove('hidden');
historyContent.classList.add('hidden');
} else {
historyTab.classList.add('text-primary', 'font-bold', 'border-primary');
historyTab.classList.remove('text-on-surface-variant');
availableTab.classList.remove('text-primary', 'font-bold', 'border-primary');
availableTab.classList.add('text-on-surface-variant');
historyContent.classList.remove('hidden');
availableContent.classList.add('hidden');
}
}
function handleStoreNavigation() {
const btn = event.currentTarget;
btn.style.transform = 'scale(0.95)';
setTimeout(() => {
btn.style.transform = '';
alert('正在为您寻找附近的合作餐厅...');
}, 150);
}
document.querySelectorAll('.active\\:scale-95').forEach(el => {
el.addEventListener('touchstart', () => el.style.transform = 'scale(0.95)');
el.addEventListener('touchend', () => el.style.transform = '');
});
</script>
</body></html>