| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <title>组装页</title>
- <script src="https://cdn.tailwindcss.com"></script>
- <style>
- /* 隐藏滚动条但保留滚动功能 */
- .no-scrollbar::-webkit-scrollbar {
- display: none;
- }
- .no-scrollbar {
- -ms-overflow-style: none;
- scrollbar-width: none;
- }
- /* iOS 弹窗缩放动画 */
- @keyframes zoomIn {
- from { transform: scale(1.1); opacity: 0; }
- to { transform: scale(1); opacity: 1; }
- }
- .animate-zoom-in {
- animation: zoomIn 0.2s ease-out forwards;
- }
- </style>
- </head>
- <body class="bg-gray-100 flex justify-center h-screen overflow-hidden font-sans">
- <!-- 移动端模拟容器 -->
- <div class="w-full max-w-[400px] h-full bg-white flex flex-col relative shadow-2xl overflow-hidden">
-
- <!-- 顶部状态栏 (全局共享) -->
- <div class="h-11 w-full flex justify-between items-center px-5 text-black bg-white z-30 relative shrink-0">
- <span class="text-[15px] font-medium">9:41</span>
- <div class="flex gap-1.5 items-center">
- <svg width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 12V9H3.5V12H1.5ZM6 12V6.5H8V12H6ZM10.5 12V3.5H12.5V12H10.5ZM15 12V0H17V12H15Z" fill="black"/></svg>
- <svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 12C9.10457 12 10 11.1046 10 10C10 8.89543 9.10457 8 8 8C6.89543 8 6 8.89543 6 10C6 11.1046 6.89543 12 8 12Z" fill="black"/><path d="M2.34315 5.65685C5.46734 2.53266 10.5327 2.53266 13.6569 5.65685" stroke="black" stroke-width="1.5" stroke-linecap="round"/><path d="M5.17157 8.48528C6.73367 6.92318 9.26633 6.92318 10.8284 8.48528" stroke="black" stroke-width="1.5" stroke-linecap="round"/></svg>
- <svg width="25" height="12" viewBox="0 0 25 12" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="0.5" y="0.5" width="21" height="11" rx="2.5" stroke="black"/><rect x="2" y="2" width="18" height="8" rx="1" fill="black"/><path d="M23 4V8" stroke="black" stroke-width="1.5" stroke-linecap="round"/></svg>
- </div>
- </div>
- <!-- 导航栏 -->
- <header class="h-11 flex items-center justify-between px-4 bg-white z-20 shrink-0 border-b border-gray-100">
- <button class="text-gray-800 p-1">
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"/></svg>
- </button>
- <h1 class="text-[17px] font-medium text-gray-900 absolute left-1/2 -translate-x-1/2">标题名称</h1>
- <div class="w-8"></div>
- </header>
- <!-- 内容滚动区 -->
- <div class="flex-1 overflow-y-auto no-scrollbar pb-8 bg-white relative">
-
- <!-- 1. 顶部占位大图 -->
- <div class="w-full h-[220px] bg-[#eef6fc] flex items-center justify-center relative">
- <!-- 内部占位 Logo 模拟 -->
- <div class="w-32 h-32 rounded-full bg-[#d5e8f4] flex items-center justify-center relative overflow-hidden">
- <svg viewBox="0 0 100 100" class="w-full h-full text-white" fill="currentColor">
- <path d="M10,90 L90,90 L50,10 Z" opacity="0.8"/>
- <circle cx="50" cy="50" r="40" opacity="0.6"/>
- </svg>
- </div>
- </div>
- <div class="px-5 pt-6 pb-2 space-y-8">
-
- <!-- 2. 主标题模块 -->
- <section>
- <h2 class="text-[20px] font-bold text-gray-900 mb-3 tracking-wide">主标题文案一行字</h2>
- <p class="text-[14px] text-gray-600 leading-[1.6] text-justify tracking-wide">
- 详情文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案
- </p>
- </section>
- <!-- 3. 权益标题模块 -->
- <section>
- <h3 class="text-[18px] font-bold text-gray-900 mb-2">权益标题</h3>
- <div class="flex flex-col">
-
- <!-- 权益项 1 -->
- <div class="flex items-center gap-4 py-4 border-b border-gray-100 active:bg-gray-50 transition cursor-pointer">
- <div class="w-12 h-12 rounded-full border border-gray-200 bg-[#fbfcfc] flex items-center justify-center text-gray-500 shrink-0">
- <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
- </div>
- <div class="flex-1">
- <div class="text-[15px] font-medium text-gray-900">权益名称一行字</div>
- <div class="text-[13px] text-gray-500 mt-1">权益简介文案权益简介文案</div>
- </div>
- <svg class="w-5 h-5 text-gray-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
- </div>
-
- <!-- 权益项 2 -->
- <div class="flex items-center gap-4 py-4 border-b border-gray-100 active:bg-gray-50 transition cursor-pointer">
- <div class="w-12 h-12 rounded-full border border-gray-200 bg-[#fbfcfc] flex items-center justify-center text-gray-500 shrink-0">
- <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
- </div>
- <div class="flex-1">
- <div class="text-[15px] font-medium text-gray-900">权益名称一行字</div>
- <div class="text-[13px] text-gray-500 mt-1">权益简介文案权益简介文案</div>
- </div>
- <svg class="w-5 h-5 text-gray-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
- </div>
- <!-- 权益项 3 -->
- <div class="flex items-center gap-4 py-4 border-b border-gray-100 active:bg-gray-50 transition cursor-pointer">
- <div class="w-12 h-12 rounded-full border border-gray-200 bg-[#fbfcfc] flex items-center justify-center text-gray-500 shrink-0">
- <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
- </div>
- <div class="flex-1">
- <div class="text-[15px] font-medium text-gray-900">权益名称一行字</div>
- <div class="text-[13px] text-gray-500 mt-1">权益简介文案权益简介文案</div>
- </div>
- <svg class="w-5 h-5 text-gray-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
- </div>
- <!-- 权益项 4 -->
- <div class="flex items-center gap-4 py-4 border-b border-gray-100 active:bg-gray-50 transition cursor-pointer">
- <div class="w-12 h-12 rounded-full border border-gray-200 bg-[#fbfcfc] flex items-center justify-center text-gray-500 shrink-0">
- <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
- </div>
- <div class="flex-1">
- <div class="text-[15px] font-medium text-gray-900">权益名称一行字</div>
- <div class="text-[13px] text-gray-500 mt-1">权益简介文案权益简介文案</div>
- </div>
- <svg class="w-5 h-5 text-gray-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
- </div>
- </div>
- </section>
- <!-- 活动标题模块已按照要求跳过不写 -->
- <!-- 4. 副标题模块 1 -->
- <section>
- <h3 class="text-[18px] font-bold text-gray-900 mb-3 tracking-wide">副标题名称一行字</h3>
- <p class="text-[14px] text-gray-600 leading-[1.6] text-justify tracking-wide">
- 详情文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案
- </p>
- </section>
- <!-- 5. 副标题模块 2 (带外链图标排版) -->
- <section>
- <h3 class="text-[18px] font-bold text-gray-900 mb-3 tracking-wide">副标题名称一行字</h3>
- <div class="text-[14px] text-gray-600 leading-[1.8] text-justify tracking-wide">
- 说明文字说明 <span class="text-gray-900 font-medium cursor-pointer hover:underline">文字链接名字</span>
- <svg class="inline-block w-3.5 h-3.5 ml-0.5 text-gray-500 mb-0.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3"/></svg>
- 明文文字链接名字 文字说明
- <svg class="inline-block w-3.5 h-3.5 mx-0.5 text-gray-500 mb-0.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3"/></svg>
- 字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明
- <span class="text-gray-900 font-medium ml-1 cursor-pointer hover:underline">文字链接名字</span>
- <svg class="inline-block w-3.5 h-3.5 ml-0.5 text-gray-500 mb-0.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3"/></svg>
- 字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明
- </div>
- </section>
- <!-- 6. 底部操作按钮 -->
- <section class="pt-4 space-y-3 pb-6">
- <button class="w-full bg-[#d70014] text-white text-[16px] font-medium py-3.5 rounded active:bg-red-800 transition">
- 可配置字段
- </button>
- <button onclick="openBottomHint()" class="w-full bg-white border border-gray-300 text-gray-900 text-[16px] font-medium py-3.5 rounded active:bg-gray-50 transition">
- 弹窗按钮
- </button>
- </section>
- </div>
- </div>
- <!-- 底部 Home Indicator (iOS风格) - 固定在最上层 -->
- <div class="h-8 w-full flex justify-center items-center z-50 absolute bottom-0 pointer-events-none bg-gradient-to-t from-white via-white to-transparent">
- <div class="w-32 h-1 bg-gray-900 rounded-full mt-2"></div>
- </div>
- <!-- 自定义 Toast 提示框 -->
- <div id="customToast" class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-gray-800 text-white text-sm px-6 py-3 rounded-lg z-[200] hidden opacity-0 transition-opacity duration-300 shadow-lg whitespace-nowrap pointer-events-none">
- 提示内容
- </div>
- <!-- 底部提示弹窗 (Bottom Hint Modal) -->
- <div id="bottomHintDialog" class="absolute inset-0 z-[100] hidden">
- <div class="absolute inset-0 bg-black/40 transition-opacity" onclick="closeBottomHint()"></div>
- <div id="bottomHintContent" class="absolute bottom-0 left-0 w-full bg-white rounded-t-xl transform translate-y-full transition-transform duration-300 ease-out flex flex-col shadow-[0_-10px_40px_rgba(0,0,0,0.1)]">
- <div class="px-5 py-4 flex justify-between items-center border-b border-gray-100 shrink-0">
- <h2 class="text-[18px] font-medium text-gray-900">提示</h2>
- <button onclick="closeBottomHint()" class="text-gray-400 p-1 hover:bg-gray-100 rounded-full transition">
- <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
- </button>
- </div>
- <div class="px-5 pt-6 pb-8">
- <p class="text-[15px] text-gray-700 leading-[1.6] mb-8">
- 详情文案文案文案文案文案文案文案文案文案文案文案文
- </p>
- <div class="flex gap-3">
- <button onclick="closeBottomHint()" class="flex-1 py-3 text-[16px] font-medium text-gray-800 bg-white border border-gray-300 rounded active:bg-gray-50 transition">取消</button>
- <button onclick="confirmBottomHint()" class="flex-1 py-3 text-[16px] font-medium text-white bg-[#d70014] rounded active:bg-red-800 transition">确认</button>
- </div>
- </div>
- </div>
- </div>
- <!-- 外部跳转拦截弹窗 (优化后 UI) -->
- <div id="externalLinkDialog" class="absolute inset-0 z-[110] flex items-center justify-center hidden">
- <!-- 遮罩层 -->
- <div class="absolute inset-0 bg-black/50 transition-opacity" onclick="closeExternalDialog()"></div>
- <!-- 弹窗本体 -->
- <div class="relative bg-white w-[300px] rounded-xl flex flex-col p-6 animate-zoom-in shadow-2xl">
- <div class="flex items-center gap-3 mb-3">
- <div class="w-8 h-8 rounded-full bg-red-50 flex items-center justify-center shrink-0">
- <svg class="w-4 h-4 text-[#d70014]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
- </div>
- <h3 class="text-[17px] font-bold text-gray-900">您正在离开汇丰中国</h3>
- </div>
- <p class="text-[13px] text-gray-500 leading-relaxed mb-6">请注意,外部网站的政策与我们网站的条款和条件以及隐私政策不同。将在新浏览器窗口或选项卡中打开下一个网站。</p>
- <div class="flex gap-3">
- <button onclick="closeExternalDialog()" class="flex-1 py-2.5 text-[15px] font-medium text-gray-700 bg-gray-100 rounded hover:bg-gray-200 active:bg-gray-200 transition">取消</button>
- <button onclick="confirmExternalDialog()" class="flex-1 py-2.5 text-[15px] font-medium text-white bg-[#d70014] rounded hover:bg-red-700 active:bg-red-800 transition">继续前往</button>
- </div>
- </div>
- </div>
- <script>
- // 自定义 Toast 显示函数,替代 alert
- function showToast(message) {
- const toast = document.getElementById('customToast');
- toast.innerText = message;
- toast.classList.remove('hidden');
-
- // 触发重绘以应用动画
- void toast.offsetWidth;
-
- toast.classList.add('opacity-100');
-
- setTimeout(() => {
- toast.classList.remove('opacity-100');
- setTimeout(() => {
- toast.classList.add('hidden');
- }, 300); // 等待淡出动画结束
- }, 2000); // 显示 2 秒
- }
- // --- 底部提示弹窗 ---
- function openBottomHint() {
- const modal = document.getElementById('bottomHintDialog');
- const content = document.getElementById('bottomHintContent');
- modal.classList.remove('hidden');
- setTimeout(() => {
- content.classList.remove('translate-y-full');
- }, 10);
- }
-
- function closeBottomHint() {
- const content = document.getElementById('bottomHintContent');
- content.classList.add('translate-y-full');
- setTimeout(() => {
- document.getElementById('bottomHintDialog').classList.add('hidden');
- }, 300);
- }
- function confirmBottomHint() {
- closeBottomHint();
- setTimeout(() => {
- openExternalDialog();
- }, 300);
- }
- // --- 外部跳转弹窗 ---
- function openExternalDialog() {
- document.getElementById('externalLinkDialog').classList.remove('hidden');
- }
-
- function closeExternalDialog() {
- document.getElementById('externalLinkDialog').classList.add('hidden');
- }
-
- function confirmExternalDialog() {
- closeExternalDialog();
- // 模拟跳转后的提示操作
- setTimeout(() => {
- showToast('已确认,将模拟跳转至外部链接!');
- }, 200); // 稍微延迟等待弹窗消失动画
- }
- </script>
- </div>
- </body>
- </html>
|