293 lines
17 KiB
HTML
293 lines
17 KiB
HTML
<!DOCTYPE html><html 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>杜康 HQ - 生成推广码</title>
|
|
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
|
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Be+Vietnam+Pro:wght@400;500&family=Inter:wght@400;500&display=swap" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet">
|
|
<script id="tailwind-config">
|
|
tailwind.config = {
|
|
darkMode: "class",
|
|
theme: {
|
|
extend: {
|
|
"colors": {
|
|
"secondary-fixed": "#ffe088",
|
|
"inverse-on-surface": "#f1f1ef",
|
|
"on-tertiary-container": "#c2cdc6",
|
|
"surface-tint": "#b3272c",
|
|
"on-primary": "#ffffff",
|
|
"aged-amber": "#FFBF00",
|
|
"primary-fixed-dim": "#ffb3ae",
|
|
"surface-dim": "#dadad8",
|
|
"secondary": "#735c00",
|
|
"tertiary-fixed-dim": "#bec9c2",
|
|
"primary": "#820012",
|
|
"tertiary-container": "#4e5852",
|
|
"surface-container-high": "#e9e8e6",
|
|
"secondary-container": "#fed65b",
|
|
"error-container": "#ffdad6",
|
|
"surface-bright": "#faf9f7",
|
|
"background": "#faf9f7",
|
|
"surface-container-highest": "#e3e2e0",
|
|
"surface-container-lowest": "#ffffff",
|
|
"inverse-surface": "#2f3130",
|
|
"on-primary-fixed-variant": "#910817",
|
|
"on-error-container": "#93000a",
|
|
"on-tertiary-fixed-variant": "#3f4943",
|
|
"on-secondary-container": "#745c00",
|
|
"ink-black": "#1A1A1A",
|
|
"tertiary-fixed": "#dae5dd",
|
|
"primary-fixed": "#ffdad7",
|
|
"on-surface": "#1a1c1b",
|
|
"on-secondary-fixed-variant": "#574500",
|
|
"surface-variant": "#e3e2e0",
|
|
"inverse-primary": "#ffb3ae",
|
|
"on-primary-fixed": "#410004",
|
|
"on-background": "#1a1c1b",
|
|
"on-tertiary-fixed": "#141e19",
|
|
"surface": "#faf9f7",
|
|
"outline-variant": "#e2bebc",
|
|
"success-green": "#2D6A4F",
|
|
"on-surface-variant": "#5a413f",
|
|
"heritage-red": "#A61D24",
|
|
"on-secondary": "#ffffff",
|
|
"subtle-gray": "#999999",
|
|
"surface-container-low": "#f4f3f1",
|
|
"outline": "#8d706e",
|
|
"secondary-fixed-dim": "#e9c349",
|
|
"on-primary-container": "#ffb9b4",
|
|
"status-blue": "#2A6EBB",
|
|
"surface-container": "#efeeec",
|
|
"error": "#ba1a1a",
|
|
"primary-container": "#a61d24",
|
|
"on-error": "#ffffff",
|
|
"on-tertiary": "#ffffff",
|
|
"on-secondary-fixed": "#241a00",
|
|
"tertiary": "#37413b"
|
|
},
|
|
"borderRadius": {
|
|
"DEFAULT": "0.25rem",
|
|
"lg": "0.5rem",
|
|
"xl": "0.75rem",
|
|
"full": "9999px"
|
|
},
|
|
"spacing": {
|
|
"stack-sm": "4px",
|
|
"margin-page": "20px",
|
|
"stack-md": "16px",
|
|
"base": "8px",
|
|
"stack-lg": "32px",
|
|
"gutter-card": "12px"
|
|
},
|
|
"fontFamily": {
|
|
"headline-lg-mobile": ["Manrope"],
|
|
"headline-lg": ["Manrope"],
|
|
"headline-xl": ["Manrope"],
|
|
"headline-md": ["Manrope"],
|
|
"body-lg": ["Be Vietnam Pro"],
|
|
"coupon-amount": ["Manrope"],
|
|
"label-md": ["Inter"],
|
|
"body-md": ["Be Vietnam Pro"]
|
|
},
|
|
"fontSize": {
|
|
"headline-lg-mobile": ["20px", {"lineHeight": "28px", "fontWeight": "600"}],
|
|
"headline-lg": ["24px", {"lineHeight": "32px", "fontWeight": "600"}],
|
|
"headline-xl": ["32px", {"lineHeight": "40px", "letterSpacing": "-0.02em", "fontWeight": "700"}],
|
|
"headline-md": ["18px", {"lineHeight": "26px", "fontWeight": "600"}],
|
|
"body-lg": ["16px", {"lineHeight": "24px", "fontWeight": "400"}],
|
|
"coupon-amount": ["28px", {"lineHeight": "28px", "fontWeight": "700"}],
|
|
"label-md": ["12px", {"lineHeight": "16px", "letterSpacing": "0.05em", "fontWeight": "500"}],
|
|
"body-md": ["14px", {"lineHeight": "20px", "fontWeight": "400"}]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style>
|
|
.material-symbols-outlined {
|
|
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
|
}
|
|
.notch-card {
|
|
position: relative;
|
|
background: white;
|
|
}
|
|
.notch-card::before, .notch-card::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 20px;
|
|
height: 20px;
|
|
background: #faf9f7;
|
|
border-radius: 50%;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
}
|
|
.notch-card::before { left: -10px; }
|
|
.notch-card::after { right: -10px; }
|
|
|
|
.form-input-focus:focus-within {
|
|
border-color: #A61D24;
|
|
box-shadow: 0 0 0 1px rgba(166, 29, 36, 0.1);
|
|
}
|
|
|
|
@keyframes fadeInScale {
|
|
from { opacity: 0; transform: scale(0.95); }
|
|
to { opacity: 1; transform: scale(1); }
|
|
}
|
|
.animate-result {
|
|
animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
}
|
|
</style>
|
|
<style>
|
|
body {
|
|
min-height: max(884px, 100dvh);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="bg-surface-bright text-on-surface font-body-md min-h-screen">
|
|
<!-- Top AppBar (Admin Context) -->
|
|
<header class="bg-surface-bright dark:bg-surface-dim shadow-[0px_4px_20px_rgba(166,29,36,0.05)] w-full top-0 sticky flex justify-between items-center px-margin-page h-16 z-40">
|
|
<div class="flex items-center gap-3">
|
|
<button class="hover:bg-surface-container-highest transition-colors p-2 rounded-full active:scale-95 duration-150">
|
|
<span class="material-symbols-outlined text-heritage-red">arrow_back</span>
|
|
</button>
|
|
<h1 class="font-headline-md text-headline-md-mobile md:text-headline-md text-heritage-red">生成推广码</h1>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<span class="text-label-md font-label-md text-subtle-gray hidden md:block">管理员 A-06</span>
|
|
<div class="w-8 h-8 rounded-full bg-surface-container-highest flex items-center justify-center overflow-hidden border border-outline-variant/20">
|
|
<img class="w-full h-full object-cover" data-alt="A professional studio portrait of a corporate administrator, dressed in a sharp charcoal suit with a subtle red tie. The lighting is soft and even, highlighting a trustworthy and authoritative expression. The background is a clean, minimalist office setting with muted architectural details in a high-end light-mode aesthetic." src="https://lh3.googleusercontent.com/aida-public/AB6AXuDneqaNXmveYuLpxz7TAXZZ5d90Ls09gAAknarY9HZxEJZd3c3WoosxEz33KPdAq-yuJuVNIqfPQfoOZBY4Uy1YDY9hqLRMCwNPUMR5eRc0YJh2GDZcTORocTkanPLAzIsdDKxOuWBMUVhesamFZOhHFo1uL6o0k6rYlTbUgFQE3zm5dOVL4nLZ6lD-T5etnDAZIQT1kowewJeJ0GA-QMpeowvf0DsK3LfjauRVQRjqUfFyNSegisw9sjZiYWGxu9nW2mXWAd_J8yE">
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main class="px-margin-page py-stack-lg max-w-2xl mx-auto space-y-stack-md">
|
|
<!-- Instruction / Context -->
|
|
<div class="pb-stack-sm">
|
|
<p class="font-body-md text-on-surface-variant">填写以下信息,为不同渠道和场景生成专属溯源推广码。</p>
|
|
</div>
|
|
<!-- Form Card Container -->
|
|
<div class="bg-surface-container-lowest rounded-xl shadow-[0px_4px_20px_rgba(166,29,36,0.05)] p-6 space-y-6">
|
|
<!-- City Picker -->
|
|
<div class="space-y-2">
|
|
<label class="block font-label-md text-on-surface-variant tracking-wider">所属城市</label>
|
|
<div class="relative form-input-focus border border-outline-variant/30 rounded-lg bg-surface-container-low transition-all">
|
|
<select class="w-full bg-transparent py-3 px-4 appearance-none focus:outline-none font-body-lg text-on-surface">
|
|
<option disabled="" selected="" value="">选择开城城市</option>
|
|
<option>洛阳</option>
|
|
<option>郑州</option>
|
|
<option>西安</option>
|
|
<option>北京</option>
|
|
</select>
|
|
<span class="material-symbols-outlined absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-subtle-gray">expand_more</span>
|
|
</div>
|
|
</div>
|
|
<!-- Promotion Scenario -->
|
|
<div class="space-y-2">
|
|
<label class="block font-label-md text-on-surface-variant tracking-wider">推广场景</label>
|
|
<div class="grid grid-cols-2 gap-3">
|
|
<label class="flex items-center gap-3 p-3 border border-outline-variant/30 rounded-lg bg-surface-container-low cursor-pointer hover:border-heritage-red/30 transition-colors">
|
|
<input class="text-heritage-red focus:ring-heritage-red" name="scenario" type="radio" value="品鉴会">
|
|
<span class="font-body-md">品鉴会</span>
|
|
</label>
|
|
<label class="flex items-center gap-3 p-3 border border-outline-variant/30 rounded-lg bg-surface-container-low cursor-pointer hover:border-heritage-red/30 transition-colors">
|
|
<input class="text-heritage-red focus:ring-heritage-red" name="scenario" type="radio" value="社区团长">
|
|
<span class="font-body-md">社区团长</span>
|
|
</label>
|
|
<label class="flex items-center gap-3 p-3 border border-outline-variant/30 rounded-lg bg-surface-container-low cursor-pointer hover:border-heritage-red/30 transition-colors">
|
|
<input class="text-heritage-red focus:ring-heritage-red" name="scenario" type="radio" value="本地公众号">
|
|
<span class="font-body-md">本地公众号</span>
|
|
</label>
|
|
<label class="flex items-center gap-3 p-3 border border-outline-variant/30 rounded-lg bg-surface-container-low cursor-pointer hover:border-heritage-red/30 transition-colors">
|
|
<input class="text-heritage-red focus:ring-heritage-red" name="scenario" type="radio" value="门店地推">
|
|
<span class="font-body-md">门店地推</span>
|
|
</label>
|
|
<label class="flex items-center gap-3 p-3 border border-outline-variant/30 rounded-lg bg-surface-container-low cursor-pointer hover:border-heritage-red/30 transition-colors col-span-2">
|
|
<input class="text-heritage-red focus:ring-heritage-red" name="scenario" type="radio" value="其他">
|
|
<span class="font-body-md">其他</span>
|
|
</label>
|
|
</div>
|
|
</div><div class="space-y-2"><label class="block font-label-md text-on-surface-variant tracking-wider">佣金比例设置</label><p class="text-sm text-on-surface-variant">设置该推广码的专属佣金比例 (0-100%)</p><div class="grid grid-cols-2 gap-3"><div class="space-y-1"><label class="block text-[10px] text-on-surface-variant uppercase tracking-wider">下单佣金比例</label><div class="relative form-input-focus border border-outline-variant/30 rounded-lg bg-surface-container-low transition-all"><input class="w-full bg-transparent py-3 px-4 appearance-none focus:outline-none font-body-lg text-on-surface pr-10" max="100" min="0" placeholder="输入比例" type="number"><span class="absolute right-3 top-1/2 -translate-y-1/2 font-body-md text-on-surface-variant">%</span></div></div><div class="space-y-1"><label class="block text-[10px] text-on-surface-variant uppercase tracking-wider">核销佣金比例</label><div class="relative form-input-focus border border-outline-variant/30 rounded-lg bg-surface-container-low transition-all"><input class="w-full bg-transparent py-3 px-4 appearance-none focus:outline-none font-body-lg text-on-surface pr-10" max="100" min="0" placeholder="输入比例" type="number"><span class="absolute right-3 top-1/2 -translate-y-1/2 font-body-md text-on-surface-variant">%</span></div></div></div><p class="text-[10px] text-subtle-gray">提示:留空则沿用该城市的默认佣金比例。</p></div>
|
|
<!-- Notes -->
|
|
<div class="space-y-2">
|
|
<label class="block font-label-md text-on-surface-variant tracking-wider">场景备注 (选填)</label>
|
|
<textarea class="w-full bg-surface-container-low border border-outline-variant/30 rounded-lg py-3 px-4 focus:ring-heritage-red focus:border-heritage-red transition-all min-h-[100px] font-body-md" placeholder="输入具体渠道名称或活动批次..."></textarea>
|
|
</div>
|
|
<!-- Submit Button -->
|
|
<button class="w-full bg-heritage-red text-white py-4 rounded-xl font-headline-md shadow-lg shadow-heritage-red/20 active:scale-95 transition-all flex items-center justify-center gap-2" id="generateBtn">
|
|
<span class="material-symbols-outlined">qr_code_2</span>
|
|
生成推广码
|
|
</button>
|
|
</div>
|
|
<!-- Result Preview Area (Initially Hidden) -->
|
|
<div class="hidden animate-result" id="resultArea">
|
|
<div class="notch-card rounded-xl shadow-lg border border-outline-variant/10 overflow-hidden mt-8">
|
|
<div class="p-6 text-center space-y-6">
|
|
<div class="inline-block p-4 bg-white border-2 border-heritage-red/10 rounded-2xl relative">
|
|
<div class="w-48 h-48 bg-surface-container flex items-center justify-center relative overflow-hidden group">
|
|
<img class="w-40 h-40" data-alt="A clean, minimalist QR code centered on a crisp white background. The QR code features a sophisticated pattern and a subtle corporate logo at its center. The lighting is flat and professional, set within a premium Dukang heritage design context, emphasizing clarity and scannability. Soft shadows ground the element in a light-mode UI environment." src="https://lh3.googleusercontent.com/aida-public/AB6AXuBsD_-nCCxuCb3eSv2tkrM7BZobuTbR-8sQhp3uSIdnhSlrkDe3Vcbw8rgEH5UteLs_jdtA7W6qB_Xo76hQKEqM1B8beVR75DSJizt6UgKgB8XP06rMKV3uekfRVNcmnipEBXgIDaHpcFunM9UXDL6Xcdpk2xeKSRLDIKLkYDUVtmZUDbKZaAcuJb70hPWJcq-L0axE_W50tdc89fEMSm-YlNXdyOPVFZwjoTo2FXhWeBOXViz1uod_2mxSL22NYz1FHeQui9S60jc">
|
|
<!-- Overlaying Dukang Branding -->
|
|
<div class="absolute inset-0 border-[8px] border-surface-container-lowest"></div>
|
|
</div>
|
|
</div>
|
|
<div class="space-y-1">
|
|
<h3 class="font-headline-md text-on-surface">渠道专属推广码</h3>
|
|
<p class="text-label-md text-subtle-gray uppercase tracking-widest">洛阳 · 品鉴会推广</p>
|
|
</div>
|
|
<div class="flex gap-3 pt-2">
|
|
<button class="flex-1 border border-heritage-red text-heritage-red py-3 rounded-lg font-label-md flex items-center justify-center gap-2 hover:bg-heritage-red/5 transition-colors">
|
|
<span class="material-symbols-outlined">download</span>
|
|
下载二维码
|
|
</button>
|
|
<button class="w-12 h-12 border border-outline flex items-center justify-center rounded-lg text-on-surface-variant hover:bg-surface-container-high transition-colors">
|
|
<span class="material-symbols-outlined">share</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<!-- Ticket-style bottom info -->
|
|
<div class="bg-surface-container-high/50 p-4 border-t border-dashed border-outline-variant/30 flex justify-between items-center">
|
|
<div class="flex items-center gap-2">
|
|
<span class="material-symbols-outlined text-sm text-status-blue">info</span>
|
|
<span class="text-[10px] text-on-surface-variant">生成时间: 2023-11-24 14:30</span>
|
|
</div>
|
|
<span class="text-[10px] font-bold text-heritage-red">ID: DK-QR-88392</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- Bottom Navigation (Shared Component Context) -->
|
|
<script>
|
|
document.getElementById('generateBtn').addEventListener('click', function() {
|
|
const btn = this;
|
|
const result = document.getElementById('resultArea');
|
|
|
|
// Loading state simulation
|
|
btn.disabled = true;
|
|
btn.innerHTML = '<span class="material-symbols-outlined animate-spin">progress_activity</span> 处理中...';
|
|
|
|
setTimeout(() => {
|
|
btn.innerHTML = '<span class="material-symbols-outlined">check_circle</span> 已生成';
|
|
btn.classList.replace('bg-heritage-red', 'bg-success-green');
|
|
|
|
result.classList.remove('hidden');
|
|
|
|
// Scroll to result
|
|
window.scrollTo({
|
|
top: document.body.scrollHeight,
|
|
behavior: 'smooth'
|
|
});
|
|
}, 800);
|
|
});
|
|
|
|
// Toggle radio buttons styles visual feedback
|
|
const radios = document.querySelectorAll('input[type="radio"]');
|
|
radios.forEach(radio => {
|
|
radio.addEventListener('change', () => {
|
|
radios.forEach(r => {
|
|
r.closest('label').classList.remove('border-heritage-red', 'bg-primary-fixed/10');
|
|
});
|
|
if (radio.checked) {
|
|
radio.closest('label').classList.add('border-heritage-red', 'bg-primary-fixed/10');
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</body></html> |