246 lines
13 KiB
HTML
246 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="zh-CN"><head>
|
|
<meta charset="utf-8"/>
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
|
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@400;600;700&family=Be+Vietnam+Pro:wght@400;500;600&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"/>
|
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
|
<style>
|
|
.material-symbols-outlined {
|
|
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
|
}
|
|
.chat-container {
|
|
height: calc(100vh - 64px - 80px);
|
|
scrollbar-width: none;
|
|
}
|
|
.chat-container::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
.notch-ticket::before, .notch-ticket::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 10px;
|
|
height: 10px;
|
|
background-color: #faf9f7;
|
|
border-radius: 50%;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
}
|
|
.notch-ticket::before { left: -5px; }
|
|
.notch-ticket::after { right: -5px; }
|
|
</style>
|
|
<script id="tailwind-config">
|
|
tailwind.config = {
|
|
darkMode: "class",
|
|
theme: {
|
|
extend: {
|
|
"colors": {
|
|
"outline-variant": "#e2bebc",
|
|
"surface-container-low": "#f4f3f1",
|
|
"subtle-gray": "#999999",
|
|
"primary-container": "#a61d24",
|
|
"on-secondary-fixed-variant": "#574500",
|
|
"surface-container": "#efeeec",
|
|
"inverse-primary": "#ffb3ae",
|
|
"primary-fixed": "#ffdad7",
|
|
"on-surface-variant": "#5a413f",
|
|
"tertiary-fixed-dim": "#bec9c2",
|
|
"surface-tint": "#b3272c",
|
|
"tertiary-fixed": "#dae5dd",
|
|
"on-error-container": "#93000a",
|
|
"on-tertiary-fixed": "#141e19",
|
|
"on-background": "#1a1c1b",
|
|
"on-tertiary-fixed-variant": "#3f4943",
|
|
"primary-fixed-dim": "#ffb3ae",
|
|
"on-primary-container": "#ffb9b4",
|
|
"secondary": "#735c00",
|
|
"on-primary-fixed": "#410004",
|
|
"status-blue": "#2A6EBB",
|
|
"on-tertiary": "#ffffff",
|
|
"on-primary": "#ffffff",
|
|
"outline": "#8d706e",
|
|
"tertiary-container": "#4e5852",
|
|
"primary": "#820012",
|
|
"on-tertiary-container": "#c2cdc6",
|
|
"aged-amber": "#FFBF00",
|
|
"inverse-surface": "#2f3130",
|
|
"heritage-red": "#A61D24",
|
|
"surface": "#faf9f7",
|
|
"on-secondary-fixed": "#241a00",
|
|
"success-green": "#2D6A4F",
|
|
"secondary-fixed-dim": "#e9c349",
|
|
"surface-container-lowest": "#ffffff",
|
|
"inverse-on-surface": "#f1f1ef",
|
|
"surface-variant": "#e3e2e0",
|
|
"surface-container-highest": "#e3e2e0",
|
|
"on-surface": "#1a1c1b",
|
|
"error-container": "#ffdad6",
|
|
"secondary-container": "#fed65b",
|
|
"on-secondary-container": "#745c00",
|
|
"tertiary": "#37413b",
|
|
"surface-bright": "#faf9f7",
|
|
"secondary-fixed": "#ffe088",
|
|
"background": "#faf9f7",
|
|
"ink-black": "#1A1A1A",
|
|
"surface-container-high": "#e9e8e6",
|
|
"surface-dim": "#dadad8",
|
|
"on-error": "#ffffff",
|
|
"on-primary-fixed-variant": "#910817",
|
|
"on-secondary": "#ffffff",
|
|
"error": "#ba1a1a"
|
|
},
|
|
"borderRadius": {
|
|
"DEFAULT": "0.25rem",
|
|
"lg": "8px",
|
|
"xl": "12px",
|
|
"full": "9999px"
|
|
},
|
|
"spacing": {
|
|
"stack-md": "16px",
|
|
"gutter-card": "12px",
|
|
"stack-sm": "4px",
|
|
"stack-lg": "32px",
|
|
"margin-page": "20px",
|
|
"base": "8px"
|
|
},
|
|
"fontFamily": {
|
|
"label-md": ["Inter"],
|
|
"headline-md": ["Manrope"],
|
|
"body-lg": ["Be Vietnam Pro"],
|
|
"headline-lg-mobile": ["Manrope"],
|
|
"headline-lg": ["Manrope"],
|
|
"coupon-amount": ["Manrope"],
|
|
"body-md": ["Be Vietnam Pro"],
|
|
"headline-xl": ["Manrope"]
|
|
},
|
|
"fontSize": {
|
|
"label-md": ["12px", {"lineHeight": "16px", "letterSpacing": "0.05em", "fontWeight": "500"}],
|
|
"headline-md": ["18px", {"lineHeight": "26px", "fontWeight": "600"}],
|
|
"body-lg": ["16px", {"lineHeight": "24px", "fontWeight": "400"}],
|
|
"headline-lg-mobile": ["20px", {"lineHeight": "28px", "fontWeight": "600"}],
|
|
"headline-lg": ["24px", {"lineHeight": "32px", "fontWeight": "600"}],
|
|
"coupon-amount": ["28px", {"lineHeight": "28px", "fontWeight": "700"}],
|
|
"body-md": ["14px", {"lineHeight": "20px", "fontWeight": "400"}],
|
|
"headline-xl": ["32px", {"lineHeight": "40px", "letterSpacing": "-0.02em", "fontWeight": "700"}]
|
|
}
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
<style>
|
|
body {
|
|
min-height: max(884px, 100dvh);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="bg-surface font-body-md text-on-surface antialiased">
|
|
<!-- TopAppBar -->
|
|
<header class="fixed top-0 left-0 w-full z-50 flex justify-between items-center px-margin-page h-16 bg-surface shadow-sm">
|
|
<div class="flex items-center gap-4">
|
|
<button class="transition-all duration-200 active:opacity-70 text-primary">
|
|
<span class="material-symbols-outlined">arrow_back_ios</span>
|
|
</button>
|
|
<h1 class="font-headline-md text-headline-md text-on-surface">在线客服</h1>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<span class="material-symbols-outlined text-primary">more_horiz</span>
|
|
</div>
|
|
</header>
|
|
<!-- Main Chat Canvas -->
|
|
<main class="chat-container mt-16 px-margin-page py-stack-md flex flex-col gap-stack-md overflow-y-auto">
|
|
<!-- Timestamp -->
|
|
<div class="flex justify-center my-4">
|
|
<span class="bg-surface-variant/30 text-subtle-gray px-3 py-1 rounded-full font-label-md text-label-md">10:45</span>
|
|
</div>
|
|
<!-- User Message -->
|
|
<div class="flex justify-end gap-3 max-w-[85%] self-end">
|
|
<div class="bg-heritage-red text-white p-3 rounded-lg shadow-sm">
|
|
<p class="font-body-md text-body-md">您好,我收到的酒水有破损,需要处理。</p>
|
|
</div>
|
|
</div>
|
|
<!-- Service Message -->
|
|
<div class="flex justify-start gap-3 max-w-[85%] self-start">
|
|
<div class="w-10 h-10 rounded-full flex-shrink-0 bg-white overflow-hidden border border-outline-variant/20 shadow-sm">
|
|
<img class="w-full h-full object-cover" data-alt="A sophisticated brand logo for Dukang Liquor, featuring a minimalist white emblem on a deep heritage red background. The style is modern yet rooted in cultural tradition, captured with a soft-focus studio lighting effect to emphasize premium quality and hospitality." src="https://lh3.googleusercontent.com/aida-public/AB6AXuAjl8fTqKH5pGcdHLx7KtawslyIc7zPTJOinzKBl66JtSN1A7qbQ4oThm6jV424-sbJTloGkX0gkmo586MGhle4YaiiCK0KEcSvjCr27PTrep4dGEPhvN0xwfBP9HrPXS0zFpew5H9dDLFUkxEDa8WTZ9enDiX0HWvzJlSjBlOuA9KIDmcJWxHsZb9ptNaJAT_pu6hReH85JpT3ymVOTbHLQTIgNoU4RxZs-7tYMsLjp-b4i74MDdtLd3xRlBGpiuzHx-qDP6q2Eyc"/>
|
|
</div>
|
|
<div class="bg-white border border-outline-variant/10 text-on-surface p-3 rounded-lg shadow-[0px_4px_20px_rgba(166,29,36,0.05)]">
|
|
<p class="font-body-md text-body-md">您好,非常抱歉给您带来不便。请提供您的订单号,我们将为您核实并安排补发。</p>
|
|
</div>
|
|
</div>
|
|
<!-- User Message -->
|
|
<div class="flex justify-end gap-3 max-w-[85%] self-end">
|
|
<div class="bg-heritage-red text-white p-3 rounded-lg shadow-sm">
|
|
<p class="font-body-md text-body-md">订单号:DK202310279981</p>
|
|
</div>
|
|
</div>
|
|
<!-- Service Message -->
|
|
<div class="flex justify-start gap-3 max-w-[85%] self-start">
|
|
<div class="w-10 h-10 rounded-full flex-shrink-0 bg-white overflow-hidden border border-outline-variant/20 shadow-sm">
|
|
<img class="w-full h-full object-cover" data-alt="A high-end, minimalist portrait of a professional female customer service representative in a subtle, neutral-toned uniform, set against a soft, clean white background. The lighting is bright and welcoming, reflecting a light-mode aesthetic with a calm, helpful atmosphere." src="https://lh3.googleusercontent.com/aida-public/AB6AXuDRdNDQRqcvsgkFJq-MfD2uPKxjUyhgxAA6DpM2gcNIbCJvdWUq2DzDd45vFjb_r0dwOxjSCYZ35pNGOSqfv4baLeu4W2vOCEUg_NmBnqUuYQMD3dPJMHDMrBr5wbKg7dngBoOEcyDMftPunIWB6y2cw4qhJiZ7PlnzPJHsjRAZT0sMRPR54i3eOqABFz--1opQ-d91mtPjqkVzcOBr8YbSTaEJUr2ulooYNdGPQACR0_Sya28FoNF5ngSz2onp_WjR6rLssAfdnTo"/>
|
|
</div>
|
|
<div class="bg-white border border-outline-variant/10 text-on-surface p-3 rounded-lg shadow-[0px_4px_20px_rgba(166,29,36,0.05)]">
|
|
<p class="font-body-md text-body-md">收到,已为您核实订单。我们已为您安排补发相同商品,系统已自动生成补发订单,配送员将尽快联系您,请保持电话畅通。</p>
|
|
</div>
|
|
</div>
|
|
<!-- System Alert / Coupon Style -->
|
|
<div class="flex justify-center my-6 w-full">
|
|
<div class="relative notch-ticket bg-white px-6 py-4 rounded-lg border border-aged-amber/30 shadow-[0px_4px_12px_rgba(255,191,0,0.1)] max-w-sm flex flex-col items-center gap-2">
|
|
<div class="flex items-center gap-2 text-aged-amber">
|
|
<span class="material-symbols-outlined" style="font-variation-settings: 'FILL' 1;">confirmation_number</span>
|
|
<span class="font-label-md text-label-md font-bold">补发申请已发起</span>
|
|
</div>
|
|
<p class="text-on-surface-variant font-body-md text-body-md text-center">关联订单:<span class="text-primary font-bold">DK202310279981</span></p>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- Bottom Input Bar -->
|
|
<footer class="fixed bottom-0 left-0 w-full bg-white px-margin-page py-3 pb-8 flex items-center gap-3 border-t border-outline-variant/10 z-50">
|
|
<button class="text-subtle-gray hover:text-primary transition-colors">
|
|
<span class="material-symbols-outlined text-2xl">add_circle</span>
|
|
</button>
|
|
<div class="flex-1 bg-surface-container-low rounded-lg px-4 py-2 flex items-center gap-2">
|
|
<input class="flex-1 bg-transparent border-none focus:ring-0 text-on-surface font-body-md text-body-md p-0" placeholder="输入消息..." type="text"/>
|
|
<button class="text-subtle-gray hover:text-aged-amber transition-colors">
|
|
<span class="material-symbols-outlined text-2xl">mood</span>
|
|
</button>
|
|
</div>
|
|
<button class="bg-heritage-red text-white px-5 py-2 rounded-lg font-label-md text-label-md transition-transform active:scale-95 shadow-sm">
|
|
发送
|
|
</button>
|
|
</footer>
|
|
<!-- Background Decoration / Subtle Red Texture -->
|
|
<div class="fixed inset-0 pointer-events-none z-[-1] opacity-5">
|
|
|
|
</div>
|
|
<script>
|
|
// Micro-interaction for smooth scrolling on message load
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const container = document.querySelector('.chat-container');
|
|
container.scrollTop = container.scrollHeight;
|
|
|
|
const input = document.querySelector('input');
|
|
const sendBtn = document.querySelector('button.bg-heritage-red');
|
|
|
|
sendBtn.addEventListener('click', () => {
|
|
if (input.value.trim() !== '') {
|
|
const msg = document.createElement('div');
|
|
msg.className = 'flex justify-end gap-3 max-w-[85%] self-end animate-in slide-in-from-right-4 duration-300';
|
|
msg.innerHTML = `
|
|
<div class="bg-heritage-red text-white p-3 rounded-lg shadow-sm">
|
|
<p class="font-body-md text-body-md">${input.value}</p>
|
|
</div>
|
|
`;
|
|
container.appendChild(msg);
|
|
input.value = '';
|
|
container.scrollTo({ top: container.scrollHeight, behavior: 'smooth' });
|
|
}
|
|
});
|
|
|
|
input.addEventListener('keypress', (e) => {
|
|
if (e.key === 'Enter') sendBtn.click();
|
|
});
|
|
});
|
|
</script>
|
|
</body></html> |