|
@@ -0,0 +1,798 @@
|
|
|
|
|
+<!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; }
|
|
|
|
|
+ .tab-indicator { transition: all 0.3s ease; }
|
|
|
|
|
+ .view-transition { transition: transform 0.35s cubic-bezier(0.4, 0.0, 0.2, 1); }
|
|
|
|
|
+ .pb-safe { padding-bottom: env(safe-area-inset-bottom); }
|
|
|
|
|
+ </style>
|
|
|
|
|
+</head>
|
|
|
|
|
+<body class="bg-gray-100 flex justify-center h-screen overflow-hidden font-sans">
|
|
|
|
|
+
|
|
|
|
|
+ <div class="fixed top-[15%] right-0 z-[100] flex flex-col items-end gap-3 max-w-sm pointer-events-none">
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 等级控制 (全局显示) -->
|
|
|
|
|
+ <div class="relative group pointer-events-auto">
|
|
|
|
|
+ <button onclick="toggleSimPanel()" class="bg-black/70 text-white text-[11px] py-1.5 px-2 rounded-l-md shadow-md flex items-center gap-1 backdrop-blur-sm">
|
|
|
|
|
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
|
|
|
+ 等级
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <div id="sim-panel" class="absolute top-0 right-[110%] bg-white/95 backdrop-blur-md border border-gray-200 p-2 rounded-lg shadow-xl w-[140px] text-[11px] transition-all origin-right scale-0 opacity-0 pointer-events-none">
|
|
|
|
|
+ <div class="font-bold mb-1.5 text-gray-800 border-b pb-1 text-center">切换等级</div>
|
|
|
|
|
+ <div class="flex flex-col gap-1.5">
|
|
|
|
|
+ <button onclick="setUserLevel('prospect')" id="btn-state-prospect" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">潜客</button>
|
|
|
|
|
+ <button onclick="setUserLevel('credit_only')" id="btn-state-credit_only" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">仅持有信用卡</button>
|
|
|
|
|
+ <button onclick="setUserLevel('advance')" id="btn-state-advance" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">运筹理财</button>
|
|
|
|
|
+ <button onclick="setUserLevel('premier')" id="btn-state-premier" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">卓越理财</button>
|
|
|
|
|
+ <button onclick="setUserLevel('elite')" id="btn-state-elite" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">卓越理财·尊尚</button>
|
|
|
|
|
+ <button onclick="setUserLevel('global')" id="btn-state-global" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">环球私人银行</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 数据控制 (默认隐藏,仅在全部活动页显示) -->
|
|
|
|
|
+ <div id="data-control-wrapper" class="relative group hidden pointer-events-auto">
|
|
|
|
|
+ <button onclick="toggleDataPanel()" class="bg-blue-600/80 text-white text-[11px] py-1.5 px-2 rounded-l-md shadow-md flex items-center gap-1 backdrop-blur-sm">
|
|
|
|
|
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>
|
|
|
|
|
+ 数据
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <div id="data-panel" class="absolute top-0 right-[110%] bg-white/95 backdrop-blur-md border border-gray-200 p-2 rounded-lg shadow-xl w-[120px] text-[11px] transition-all origin-right scale-0 opacity-0 pointer-events-none">
|
|
|
|
|
+ <div class="font-bold mb-1.5 text-gray-800 border-b pb-1 text-center">活动数据</div>
|
|
|
|
|
+ <div class="flex flex-col gap-1.5">
|
|
|
|
|
+ <button onclick="setAllActivitiesData(true)" id="btn-data-true" class="px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium">有数据</button>
|
|
|
|
|
+ <button onclick="setAllActivitiesData(false)" id="btn-data-false" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">无数据</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 详情页控制 (默认隐藏,仅在活动详情页显示) -->
|
|
|
|
|
+ <div id="detail-control-wrapper" class="hidden flex-col gap-3 pointer-events-auto">
|
|
|
|
|
+ <!-- 按钮状态控制 -->
|
|
|
|
|
+ <div class="relative group">
|
|
|
|
|
+ <button onclick="toggleDetailBtnPanel()" class="bg-indigo-600/80 text-white text-[11px] py-1.5 px-2 rounded-l-md shadow-md flex items-center gap-1 backdrop-blur-sm">
|
|
|
|
|
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>
|
|
|
|
|
+ 按钮
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <div id="detail-btn-panel" class="absolute top-0 right-[110%] bg-white/95 backdrop-blur-md border border-gray-200 p-2 rounded-lg shadow-xl w-[120px] text-[11px] transition-all origin-right scale-0 opacity-0 pointer-events-none">
|
|
|
|
|
+ <div class="font-bold mb-1.5 text-gray-800 border-b pb-1 text-center">按钮状态</div>
|
|
|
|
|
+ <div class="flex flex-col gap-1.5">
|
|
|
|
|
+ <button onclick="setDetailBtnState('enroll')" id="btn-detail-enroll" class="px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium">报名</button>
|
|
|
|
|
+ <button onclick="setDetailBtnState('progress')" id="btn-detail-progress" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">查看进度</button>
|
|
|
|
|
+ <button onclick="setDetailBtnState('benefits')" id="btn-detail-benefits" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">查看权益</button>
|
|
|
|
|
+ <button onclick="setDetailBtnState('more')" id="btn-detail-more" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">查看更多</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 报名结果控制 (仅报名状态下显示) -->
|
|
|
|
|
+ <div class="relative group" id="enroll-result-control">
|
|
|
|
|
+ <button onclick="toggleEnrollResultPanel()" class="bg-purple-600/80 text-white text-[11px] py-1.5 px-2 rounded-l-md shadow-md flex items-center gap-1 backdrop-blur-sm">
|
|
|
|
|
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
|
|
|
|
|
+ 结果
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <div id="enroll-result-panel" class="absolute top-0 right-[110%] bg-white/95 backdrop-blur-md border border-gray-200 p-2 rounded-lg shadow-xl w-[120px] text-[11px] transition-all origin-right scale-0 opacity-0 pointer-events-none">
|
|
|
|
|
+ <div class="font-bold mb-1.5 text-gray-800 border-b pb-1 text-center">报名结果</div>
|
|
|
|
|
+ <div class="flex flex-col gap-1.5">
|
|
|
|
|
+ <button onclick="setEnrollCondition('success')" id="cond-success" class="px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium">通过校验</button>
|
|
|
|
|
+ <button onclick="setEnrollCondition('not_eligible')" id="cond-not_eligible" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">不符合</button>
|
|
|
|
|
+ <button onclick="setEnrollCondition('full')" id="cond-full" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">名额不足</button>
|
|
|
|
|
+ <button onclick="setEnrollCondition('exclusive')" id="cond-exclusive" class="px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition">命中互斥</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <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-[90] 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"><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"><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"><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>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 视图层容器 (包含所有子页面) -->
|
|
|
|
|
+ <div class="flex-1 relative w-full overflow-hidden bg-gray-100">
|
|
|
|
|
+
|
|
|
|
|
+ <div id="home-view" class="absolute inset-0 bg-white flex flex-col view-transition translate-x-0 z-10">
|
|
|
|
|
+ <header class="h-11 flex items-center justify-between px-4 bg-white z-20 shrink-0">
|
|
|
|
|
+ <button class="text-gray-800 p-1"><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">
|
|
|
|
|
+ <!-- 潜客横幅 -->
|
|
|
|
|
+ <div id="no-tier-banner" onclick="showZone()" class="px-4 py-3 bg-[#fdfaf8] border-b border-gray-100 flex items-center justify-between cursor-pointer active:bg-gray-50 transition">
|
|
|
|
|
+ <div class="flex items-center gap-3">
|
|
|
|
|
+ <div class="w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center border border-gray-200">
|
|
|
|
|
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="14" x="3" y="8" rx="2"/><path d="M12 5a3 3 0 1 0-3 3"/><path d="M15 8a3 3 0 1 0-3-3"/><path d="M12 8v10"/><path d="M3 12h18"/></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="text-[15px] text-gray-900">权益首页</div>
|
|
|
|
|
+ <div class="text-[12px] text-gray-500">一键查看您的所有权益</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="text-[13px] text-gray-500 flex items-center pointer-events-none">
|
|
|
|
|
+ 立即查看 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- Tabs -->
|
|
|
|
|
+ <div class="flex justify-between px-2 pt-2 border-b border-gray-200 relative">
|
|
|
|
|
+ <button onclick="switchTab('premier')" class="flex-1 py-3 text-[14px] font-medium relative text-gray-900" id="tab-btn-premier">卓越理财</button>
|
|
|
|
|
+ <button onclick="switchTab('elite')" class="flex-1 py-3 text-[14px] font-medium relative text-gray-500" id="tab-btn-elite">卓越理财·尊尚</button>
|
|
|
|
|
+ <button onclick="switchTab('global')" class="flex-1 py-3 text-[14px] font-medium relative text-gray-500" id="tab-btn-global">环球私人银行</button>
|
|
|
|
|
+ <div id="tab-indicator" class="absolute bottom-0 h-[2px] bg-[#d70014] tab-indicator" style="width: 33.33%; left: 0%;"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 动态内容区 -->
|
|
|
|
|
+ <div id="content-area" class="px-5 pt-5 pb-10"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="zone-view" class="absolute inset-0 bg-[#f4f5f8] flex flex-col view-transition translate-x-full z-20">
|
|
|
|
|
+ <header class="h-11 flex items-center justify-between px-4 bg-white z-20 shrink-0 border-b border-gray-100">
|
|
|
|
|
+ <button onclick="hideZone()" class="text-gray-800 p-1"><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" id="zone-content-area"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="my-activities-view" class="absolute inset-0 bg-white flex flex-col view-transition translate-x-full z-30">
|
|
|
|
|
+ <header class="h-11 flex items-center justify-between px-4 bg-white z-20 shrink-0">
|
|
|
|
|
+ <button onclick="closeMyActivities()" class="text-gray-800 p-1"><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>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- My Activities Tabs -->
|
|
|
|
|
+ <div class="flex border-b border-gray-200 shrink-0 relative">
|
|
|
|
|
+ <button class="flex-1 py-3 text-[15px] font-medium text-gray-900 text-center" onclick="switchActivitiesTab('ongoing')" id="tab-my-ongoing">进行中</button>
|
|
|
|
|
+ <button class="flex-1 py-3 text-[15px] font-medium text-gray-500 text-center" onclick="switchActivitiesTab('ended')" id="tab-my-ended">已结束</button>
|
|
|
|
|
+ <div id="my-activities-indicator" class="absolute bottom-0 h-[2px] bg-[#d70014] transition-all duration-300" style="width: 50%; left: 0%;"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="flex-1 overflow-y-auto no-scrollbar bg-white">
|
|
|
|
|
+ <!-- 进行中列表 -->
|
|
|
|
|
+ <div id="activities-ongoing-content" class="bg-white">
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 px-5 border-b border-gray-100 cursor-pointer active:bg-gray-50 transition" onclick="openActivityDetail('my_activity')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=100&h=100&fit=crop" class="w-14 h-14 object-cover shrink-0">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[14px] text-gray-900 font-medium truncate mb-1">2026 汇丰母亲节特别活动</h4>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026年/9月20日 周六14:00</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5"><path d="m9 18 6-6-6-6"/></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 px-5 border-b border-gray-100 cursor-pointer active:bg-gray-50 transition" onclick="openActivityDetail('my_activity')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1563986768494-4dee2763ff3f?w=100&h=100&fit=crop" class="w-14 h-14 object-cover shrink-0">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[14px] text-gray-900 font-medium truncate mb-1">2026 汇丰中国理财讲座</h4>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026年/9月20日 周六14:00</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5"><path d="m9 18 6-6-6-6"/></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 信用卡活动专区入口 -->
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 px-5 border-b border-gray-100 cursor-pointer active:bg-gray-50 transition mt-2">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <div class="w-14 h-14 bg-gray-200 shrink-0"></div>
|
|
|
|
|
+ <h4 class="text-[15px] text-gray-900 font-medium truncate flex-1">信用卡活动</h4>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5"><path d="m9 18 6-6-6-6"/></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="px-5 py-4 text-[12px] text-gray-500 leading-relaxed">
|
|
|
|
|
+ 温馨提示:如需查看信用卡活动进度,请点击进行中-信用卡活动专区。
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 已结束列表 (Grayscale) -->
|
|
|
|
|
+ <div id="activities-ended-content" class="bg-white hidden">
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 px-5 border-b border-gray-100 cursor-pointer opacity-40 grayscale transition" onclick="openActivityDetail('my_activity')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=100&h=100&fit=crop" class="w-14 h-14 object-cover shrink-0">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[14px] text-gray-900 font-medium truncate mb-1">2026 汇丰母亲节特别活动</h4>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026年/9月20日 周六14:00</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5"><path d="m9 18 6-6-6-6"/></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 px-5 border-b border-gray-100 cursor-pointer opacity-40 grayscale transition" onclick="openActivityDetail('my_activity')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1563986768494-4dee2763ff3f?w=100&h=100&fit=crop" class="w-14 h-14 object-cover shrink-0">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[14px] text-gray-900 font-medium truncate mb-1">2026 汇丰中国理财讲座</h4>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026年/9月20日 周六14:00</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5"><path d="m9 18 6-6-6-6"/></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 px-5 border-b border-gray-100 cursor-pointer opacity-40 grayscale transition" onclick="openActivityDetail('my_activity')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=100&h=100&fit=crop" class="w-14 h-14 object-cover shrink-0">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[14px] text-gray-900 font-medium truncate mb-1">汇丰中国 3Q 层层升级礼遇</h4>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026年/12月12日-2026年/12月24日</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5"><path d="m9 18 6-6-6-6"/></svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="px-5 py-4 text-[12px] text-gray-500 leading-relaxed">
|
|
|
|
|
+ 温馨提示:如需查看信用卡活动进度,请点击进行中-信用卡活动专区。
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="all-activities-view" class="absolute inset-0 bg-white flex flex-col view-transition translate-x-full z-40">
|
|
|
|
|
+ <header class="h-11 flex items-center justify-between px-4 bg-white z-20 shrink-0">
|
|
|
|
|
+ <button onclick="closeAllActivities()" class="text-gray-800 p-1"><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>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- All Activities Tabs -->
|
|
|
|
|
+ <div class="flex border-b border-gray-200 shrink-0 relative">
|
|
|
|
|
+ <button class="flex-1 py-3 text-[14px] font-medium text-gray-900 text-center" onclick="switchAllActivitiesTab('online')" id="tab-all-online">线上活动</button>
|
|
|
|
|
+ <button class="flex-1 py-3 text-[14px] font-medium text-gray-500 text-center" onclick="switchAllActivitiesTab('offline')" id="tab-all-offline">线下活动</button>
|
|
|
|
|
+ <div id="all-activities-indicator" class="absolute bottom-0 h-[2px] bg-[#d70014] transition-all duration-300" style="width: 50%; left: 0%;"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="flex-1 overflow-y-auto no-scrollbar bg-white relative">
|
|
|
|
|
+ <!-- 数据容器 -->
|
|
|
|
|
+ <div id="all-activities-content" class="pb-24 flex flex-col min-h-full">
|
|
|
|
|
+ <!-- JS Render Here -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 信用卡入口 (固定在内容区底部) -->
|
|
|
|
|
+ <div class="absolute bottom-6 left-5 right-5 h-12 border border-[#d70014] rounded text-[#d70014] flex items-center justify-center font-medium text-[15px] cursor-pointer active:bg-gray-50 transition bg-white" onclick="showToast('正在跳转信用卡平台...')">
|
|
|
|
|
+ 信用卡活动专区入口
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="activity-detail-view" class="absolute inset-0 bg-white flex flex-col view-transition translate-x-full z-45">
|
|
|
|
|
+ <header class="h-11 flex items-center justify-between px-4 bg-white/90 backdrop-blur-sm z-20 shrink-0 absolute top-0 left-0 w-full">
|
|
|
|
|
+ <button onclick="closeActivityDetail()" class="text-gray-800 p-1"><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-24 relative bg-white">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800&auto=format&fit=crop" class="w-full h-[220px] object-cover shrink-0 block">
|
|
|
|
|
+
|
|
|
|
|
+ <div class="px-5 py-5">
|
|
|
|
|
+ <h2 class="text-[20px] font-medium text-gray-900 mb-4 tracking-wide">2025 汇丰母亲节特别活动</h2>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="text-[13px] text-gray-600 space-y-2 mb-8 tracking-wide">
|
|
|
|
|
+ <p>活动对象:文字文字文字</p>
|
|
|
|
|
+ <p>活动报名时间:年/月/日/时-年/月/日/时</p>
|
|
|
|
|
+ <p>活动进行时间:年/月/日/时-年/月/日/时</p>
|
|
|
|
|
+ <p>活动地点:北京华贸丽思卡尔顿酒店大宴会厅</p>
|
|
|
|
|
+ <p>报名人数:数字(配置则展示)</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <h3 class="text-[17px] font-medium text-gray-900 mb-4">活动详情</h3>
|
|
|
|
|
+ <div class="text-[14px] text-gray-600 leading-[1.8] mb-8 text-justify tracking-wide">
|
|
|
|
|
+ <p class="mb-4">带领嘉宾初步进入风水的世界,探索古人智慧的深度。用传统智慧理念和专业的财富规划帮助客户更好把握机遇。实现财富积累,代代传承。</p>
|
|
|
|
|
+ <p class="mb-4">特邀嘉宾:赵丹青<br>现系国际青年易经学会会员;<br>香港中美易经学会会员及“中华周易学会”理事;<br>担任香港《楼盘与风水》杂志编委,《财务圈》杂志上开设风水专栏,为LV, Tiffany, Ports等著名国际时尚品牌公司堪舆;<br>任澳大利亚周易研究会副会长。</p>
|
|
|
|
|
+ <p>活动流程:<br>14:00 - 14:30 嘉宾签到<br>14:30 - 14:45 汇丰私人财富规划简介<br>14:45 - 16:15 嘉宾主题分享-习住家风水 创财富人生<br>16:15 - 17:00 茶歇&自由交流</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 层级 Tabs -->
|
|
|
|
|
+ <div class="flex border-b border-gray-200 mb-5 relative">
|
|
|
|
|
+ <button class="flex-1 py-3 text-[14px] font-medium text-gray-900 text-center" onclick="switchDetailTier(1)" id="tier-tab-1">层级一</button>
|
|
|
|
|
+ <button class="flex-1 py-3 text-[14px] font-medium text-gray-500 text-center" onclick="switchDetailTier(2)" id="tier-tab-2">层级二</button>
|
|
|
|
|
+ <button class="flex-1 py-3 text-[14px] font-medium text-gray-500 text-center" onclick="switchDetailTier(3)" id="tier-tab-3">层级三</button>
|
|
|
|
|
+ <button class="flex-1 py-3 text-[14px] font-medium text-gray-500 text-center" onclick="switchDetailTier(4)" id="tier-tab-4">层级四</button>
|
|
|
|
|
+ <div id="detail-tier-indicator" class="absolute bottom-0 h-[2px] bg-[#d70014] transition-all duration-300" style="width: 25%; left: 0%;"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 层级内容 -->
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <h4 class="text-[15px] font-medium text-gray-900 mb-2">达标要求</h4>
|
|
|
|
|
+ <p class="text-[14px] text-gray-600 leading-[1.6] mb-5 tracking-wide">活动期间,首次升级为“合格卓越理财”客户,且保持3个月,3个自然月任一月末日终,较2025年3月末新增持有1类以上资产大类。</p>
|
|
|
|
|
+ <h4 class="text-[15px] font-medium text-gray-900 mb-2">达标奖励</h4>
|
|
|
|
|
+ <p class="text-[14px] text-gray-600 leading-[1.6] tracking-wide mb-10">32万汇友荟积分(可兑换约等值¥500好礼)</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 底部操作栏 -->
|
|
|
|
|
+ <div class="absolute bottom-0 left-0 w-full h-[68px] bg-white border-t border-gray-100 flex items-center justify-center px-4 z-30 shrink-0 shadow-[0_-2px_10px_rgba(0,0,0,0.03)] pb-safe">
|
|
|
|
|
+ <button id="detail-main-btn" class="w-full h-11 bg-[#d70014] text-white text-[16px] font-medium rounded-[2px]" onclick="handleDetailAction()">报名</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </div> <!-- 结束视图层容器 -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 积分规则弹窗 -->
|
|
|
|
|
+ <div id="rule-modal-backdrop" class="absolute inset-0 bg-black/50 z-[60] opacity-0 pointer-events-none transition-opacity duration-300" onclick="closeRuleModal()"></div>
|
|
|
|
|
+ <div id="rule-modal" class="absolute bottom-0 left-0 w-full bg-white z-[70] rounded-t-2xl transform translate-y-full transition-transform duration-300 flex flex-col" style="height: 85%;">
|
|
|
|
|
+ <div class="flex justify-between items-center px-5 py-4 border-b border-gray-100 shrink-0">
|
|
|
|
|
+ <h2 class="text-[17px] font-medium text-gray-900">积分规则</h2>
|
|
|
|
|
+ <button onclick="closeRuleModal()" class="text-gray-500 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"><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="flex-1 overflow-y-auto px-5 py-5 no-scrollbar">
|
|
|
|
|
+ <h3 class="text-[14px] font-medium text-gray-800 mb-4">汇丰银行(中国)有限公司积分使用规则</h3>
|
|
|
|
|
+ <div class="text-[13px] text-gray-600 leading-[1.8] space-y-4 text-justify">
|
|
|
|
|
+ <p>本积分使用规则(“本规则”)为汇丰银行(中国)有限公司(“本行”)的客户(“客户”)使用本行信用卡及借记卡积分(即“汇友荟”汇丰客户关系积分)(简称“汇友荟积分”)兑换本行提供的礼品、里程或刷卡金等项目(具体以本行积分换礼平台正式公布的有效兑换项目为准,以下称“兑换项目”)等需要遵守的使用规则。</p>
|
|
|
|
|
+ <p class="font-medium text-gray-800 pt-2">一、 兑换及使用渠道</p>
|
|
|
|
|
+ <p>1. 除本规则以下相关兑换项目项下有特别说明外,客户可使用信用卡积分及“汇友荟”汇丰客户关系积分在积分换礼平台兑换相关项目,具体兑换渠道如下:<br>
|
|
|
|
|
+ (1) 登录“汇丰中国客户服务”微信服务号,点击“我的汇丰”—“我的积分”—“积分商城”页面兑换;或<br>
|
|
|
|
|
+ (2) 登录汇丰银行App,在“我的”点击“我的积分”—“积分商城”页面兑换礼品;<br>
|
|
|
|
|
+ (3) 人工服务申请兑换:拨打本行24小时客服热线95366或4008695366(该渠道仅限本行信用卡主卡持卡人兑换部分项目申请时使用)兑换。</p>
|
|
|
|
|
+ <p>2. 积分一旦兑换成功,不可撤销、更改或退还。若因系统或网络原因导致兑换失败,积分将自动退回账户。</p>
|
|
|
|
|
+ <p class="font-medium text-gray-800 pt-2">二、 积分有效期</p>
|
|
|
|
|
+ <p>信用卡积分有效期与信用卡有效期一致。如客户在信用卡有效期届满前未消耗完毕,积分将于信用卡到期次月清零。“汇友荟”积分有效期详见对应活动的具体规则。请客户关注积分到期日并及时兑换。</p>
|
|
|
|
|
+ <p class="pt-10 pb-10 text-center text-gray-300">-- 到底了 --</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 余额计算规则弹窗 -->
|
|
|
|
|
+ <div id="balance-rule-modal-backdrop" class="absolute inset-0 bg-black/50 z-[60] opacity-0 pointer-events-none transition-opacity duration-300" onclick="closeBalanceRuleModal()"></div>
|
|
|
|
|
+ <div id="balance-rule-modal" class="absolute bottom-0 left-0 w-full bg-white z-[70] rounded-t-2xl transform translate-y-full transition-transform duration-300 flex flex-col min-h-[220px]">
|
|
|
|
|
+ <div class="flex justify-between items-center px-5 py-4 shrink-0 border-b border-gray-50">
|
|
|
|
|
+ <h2 class="text-[18px] font-medium text-gray-900">提示</h2>
|
|
|
|
|
+ <button onclick="closeBalanceRuleModal()" class="text-gray-500 p-1 hover:bg-gray-100 rounded-full transition">
|
|
|
|
|
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><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="flex-1 px-5 pb-8 pt-4">
|
|
|
|
|
+ <div class="text-[15px] text-gray-700 leading-[1.6]">
|
|
|
|
|
+ 月内日均余额 = 当月内每日账户余额之和 / 当月天数。
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 报名通用提示弹窗 (不符合/已满/互斥) -->
|
|
|
|
|
+ <div id="alert-modal-backdrop" class="absolute inset-0 bg-black/50 z-[60] opacity-0 pointer-events-none transition-opacity duration-300" onclick="closeAlertModal()"></div>
|
|
|
|
|
+ <div id="alert-modal" class="absolute bottom-0 left-0 w-full bg-white z-[70] rounded-t-xl transform translate-y-full transition-transform duration-300 flex flex-col min-h-[200px]">
|
|
|
|
|
+ <div class="flex justify-between items-center px-5 py-4 shrink-0">
|
|
|
|
|
+ <h2 class="text-[17px] font-medium text-gray-900">提示</h2>
|
|
|
|
|
+ <button onclick="closeAlertModal()" class="text-gray-500 p-1 hover:bg-gray-100 rounded-full transition">
|
|
|
|
|
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><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 pb-6 pt-2 text-[15px] text-gray-700" id="alert-modal-msg">
|
|
|
|
|
+ 您暂不符合报名条件
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="px-5 pb-8">
|
|
|
|
|
+ <button onclick="closeAlertModal()" class="w-full py-2.5 border border-[#cccccc] rounded-[2px] text-[16px] text-gray-800 bg-white font-medium active:bg-gray-50">返回首页</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 报名确认弹窗 -->
|
|
|
|
|
+ <div id="confirm-modal-backdrop" class="absolute inset-0 bg-black/50 z-[60] opacity-0 pointer-events-none transition-opacity duration-300" onclick="closeConfirmModal()"></div>
|
|
|
|
|
+ <div id="confirm-modal" class="absolute bottom-0 left-0 w-full bg-white z-[70] rounded-t-xl transform translate-y-full transition-transform duration-300 flex flex-col min-h-[220px]">
|
|
|
|
|
+ <div class="flex justify-between items-center px-5 py-4 shrink-0">
|
|
|
|
|
+ <h2 class="text-[17px] font-medium text-gray-900">报名确认</h2>
|
|
|
|
|
+ <button onclick="closeConfirmModal()" class="text-gray-500 p-1 hover:bg-gray-100 rounded-full transition">
|
|
|
|
|
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><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 pb-8 pt-2 text-[15px] text-gray-700">
|
|
|
|
|
+ 你确定报名参加此「2025 汇丰母亲节特别活动」?
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex px-5 pb-8 gap-3">
|
|
|
|
|
+ <button onclick="closeConfirmModal()" class="flex-1 py-2.5 border border-[#cccccc] rounded-[2px] text-[16px] text-gray-800 bg-white font-medium active:bg-gray-50">取消</button>
|
|
|
|
|
+ <button onclick="closeConfirmModal(); showToast('报名成功')" class="flex-1 py-2.5 rounded-[2px] text-[16px] text-white bg-[#d70014] font-medium active:opacity-90">确认</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Toast -->
|
|
|
|
|
+ <div id="toast" class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-black/80 text-white px-4 py-2 rounded-md text-[14px] z-[100] opacity-0 pointer-events-none transition-opacity duration-300 text-center w-max max-w-[80%]"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 底部 Home Indicator (iOS风格) -->
|
|
|
|
|
+ <div class="h-8 w-full flex justify-center items-center z-[80] absolute bottom-0 pointer-events-none">
|
|
|
|
|
+ <div class="w-32 h-1 bg-gray-900 rounded-full"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <script>
|
|
|
|
|
+ // --- 图标库 ---
|
|
|
|
|
+ const icons = {
|
|
|
|
|
+ cap: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><path d="M22 10v6M2 10l10-5 10 5-10 5z"/><path d="M6 12v5c3 3 9 3 12 0v-5"/></svg>`,
|
|
|
|
|
+ heart: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,
|
|
|
|
|
+ bulb: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.9 1.2 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>`,
|
|
|
|
|
+ gift: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><rect x="3" y="8" width="18" height="14" rx="2"/><path d="M12 5a3 3 0 1 0-3 3"/><path d="M15 8a3 3 0 1 0-3-3"/><path d="M12 8v14"/><path d="M3 12h18"/></svg>`,
|
|
|
|
|
+ diamond: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><path d="M6 3h12l4 6-10 13L2 9Z"/></svg>`,
|
|
|
|
|
+ medbox: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><rect x="4" y="8" width="16" height="12" rx="2"/><path d="M8 8V6a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M12 11v4M10 13h4"/></svg>`,
|
|
|
|
|
+ car: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><path d="M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 12 10s-6.7.6-8.5 1.1C2.7 11.3 2 12.1 2 13v3c0 .6.4 1 1 1h2"/><rect width="16" height="8" x="4" y="10" rx="2"/><path d="M7 14h.01"/><path d="M17 14h.01"/><path d="m10 10-1.5-4h7l-1.5 4"/></svg>`,
|
|
|
|
|
+ plane: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><path d="M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.2-1.1.7l-1.2 3.6 7.7 4.4-4.2 4.2-3.1-.8c-.4-.1-.8.1-1 .5l-.8 2.3 5.4 1.8 1.8 5.4 2.3-.8c.4-.2.6-.6.5-1l-.8-3.1 4.2-4.2 4.4 7.7 3.6-1.2c.5-.2.8-.6.7-1.1Z"/></svg>`,
|
|
|
|
|
+ globe: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><circle cx="12" cy="12" r="10"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/><path d="M2 12h20"/></svg>`,
|
|
|
|
|
+ coffee: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="#ba6534" stroke-width="1.5"><path d="M17 8h1a4 4 0 1 1 0 8h-1"/><path d="M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z"/><line x1="6" x2="6" y1="2" y2="4"/><line x1="10" x2="10" y1="2" y2="4"/><line x1="14" x2="14" y1="2" y2="4"/></svg>`,
|
|
|
|
|
+ planeRed: `<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="#d70014" stroke-width="1.5"><path d="M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.2-1.1.7l-1.2 3.6 7.7 4.4-4.2 4.2-3.1-.8c-.4-.1-.8.1-1 .5l-.8 2.3 5.4 1.8 1.8 5.4 2.3-.8c.4-.2.6-.6.5-1l-.8-3.1 4.2-4.2 4.4 7.7 3.6-1.2c.5-.2.8-.6.7-1.1Z"/></svg>`,
|
|
|
|
|
+ help: `<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5" class="ml-1 inline-block"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>`,
|
|
|
|
|
+ copy: `<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5" class="ml-1 inline-block cursor-pointer"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>`,
|
|
|
|
|
+ doc: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" class="mr-1 inline-block"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>`,
|
|
|
|
|
+ clipboard: `<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><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>`,
|
|
|
|
|
+ clock: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" class="inline-block mr-1"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>`,
|
|
|
|
|
+ chevronRight: `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="1.5"><path d="m9 18 6-6-6-6"/></svg>`
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // --- 全局状态 ---
|
|
|
|
|
+ let currentUserLevel = 'advance';
|
|
|
|
|
+ let currentHomeTab = 'premier';
|
|
|
|
|
+
|
|
|
|
|
+ let currentAllActivitiesTab = 'online';
|
|
|
|
|
+ let hasAllActivitiesData = true;
|
|
|
|
|
+
|
|
|
|
|
+ let currentDetailBtnState = 'enroll';
|
|
|
|
|
+ let currentEnrollCondition = 'success';
|
|
|
|
|
+
|
|
|
|
|
+ let isSimPanelOpen = false;
|
|
|
|
|
+ let isDataPanelOpen = false;
|
|
|
|
|
+ let isDetailBtnPanelOpen = false;
|
|
|
|
|
+ let isEnrollResultPanelOpen = false;
|
|
|
|
|
+
|
|
|
|
|
+ // --- 初始化渲染 ---
|
|
|
|
|
+ document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
|
+ // 修复:直接使用 setUserLevel 完成页面数据渲染和侧边栏状态的高亮初始化
|
|
|
|
|
+ setUserLevel('advance');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // --- ====== View A: 首页逻辑 ====== ---
|
|
|
|
|
+ const homeTabData = {
|
|
|
|
|
+ premier: { title: '卓越理财', subtitle: '为您和您的家人提供尊崇专属礼遇和权益', imageSrc: 'https://images.unsplash.com/photo-1518893494013-481c1d8ed3fd?w=800&fit=crop', features: [{ title: '国际教育', desc: '享专属国际化学校优惠及背景提升项目' }, { title: '酒店礼遇', desc: '高端酒店及商场会籍匹配' }, { title: '环球礼遇', desc: '汇丰中国信用卡持卡人,尊享机场贵宾厅及礼宾车等礼遇' }] },
|
|
|
|
|
+ elite: { title: '卓越理财·尊尚', subtitle: '开启尊尚体验,享受环球出行、高端运动等VIP礼遇。', imageSrc: 'https://images.unsplash.com/photo-1610701596007-11502861dcfa?w=800&fit=crop', features: [{ title: '国际教育', desc: '享多项升学规划指导' }, { title: '专属礼宾服务', desc: '高端酒店及商场会籍匹配' }, { title: '尊尚生日礼', desc: '尊享体验任选其一' }] },
|
|
|
|
|
+ global: { title: '环球私人银行', subtitle: '开启环球「创臻享」及「汇佑健康」之旅。', imageSrc: 'https://images.unsplash.com/photo-1550684848-fac1c5b4e853?w=800&fit=crop', features: [{ title: '高尔夫权益', desc: '练习场畅达及VIP预约' }, { title: '臻享体验', desc: '米其林级别私宴预定服务等' }, { title: '环球旅行', desc: '境外接送机及升房礼遇' }] }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ function renderHomePage() {
|
|
|
|
|
+ const isBasic = ['prospect', 'credit_only', 'advance'].includes(currentUserLevel);
|
|
|
|
|
+ document.getElementById('no-tier-banner').style.display = isBasic ? 'flex' : 'none';
|
|
|
|
|
+
|
|
|
|
|
+ ['premier', 'elite', 'global'].forEach((tab, index) => {
|
|
|
|
|
+ const btn = document.getElementById(`tab-btn-${tab}`);
|
|
|
|
|
+ btn.className = (tab === currentHomeTab) ? "flex-1 py-3 text-[14px] font-medium relative text-gray-900" : "flex-1 py-3 text-[14px] font-medium relative text-gray-500";
|
|
|
|
|
+ if(tab === currentHomeTab) document.getElementById('tab-indicator').style.left = `${index * 33.33}%`;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const data = homeTabData[currentHomeTab];
|
|
|
|
|
+ const levelWeights = { 'prospect': 0, 'credit_only': 0, 'advance': 0, 'premier': 1, 'elite': 2, 'global': 3 };
|
|
|
|
|
+ const isUnlocked = levelWeights[currentUserLevel] >= levelWeights[currentHomeTab];
|
|
|
|
|
+
|
|
|
|
|
+ let buttonHTML = isUnlocked ? `<button onclick="showZone()" class="w-full py-3 mt-4 mb-6 border border-gray-300 rounded text-[15px] font-medium text-gray-900 bg-white active:bg-gray-50 transition">进入权益专区</button>` : `<button class="w-full py-3 mt-4 mb-6 rounded text-[15px] font-medium text-[#b3b3b3] bg-[#f7f7f7] cursor-not-allowed">待解锁</button>`;
|
|
|
|
|
+
|
|
|
|
|
+ let featuresHTML = currentHomeTab === 'global'
|
|
|
|
|
+ ? '<div class="flex flex-col border-t border-gray-100 pt-2">' + data.features.map(f => `<div class="flex items-center gap-4 py-4 border-b border-gray-100 last:border-0"><div class="w-12 h-12 rounded-full border border-gray-200 bg-[#fbfcfc] flex items-center justify-center text-gray-500 shrink-0">${icons.clipboard}</div><div class="flex-1"><div class="text-[15px] font-medium text-gray-900">${f.title}</div><div class="text-[13px] text-gray-500 mt-1">${f.desc}</div></div></div>`).join('') + '</div>'
|
|
|
|
|
+ : '<ul class="text-sm">' + data.features.map(f => `<li class="flex items-start mb-3 relative pl-3"><span class="absolute left-0 top-[8px] w-1 h-1 bg-gray-600 rounded-full"></span><div><span class="text-gray-900 font-medium text-[13px] mr-1">${f.title}</span><p class="text-gray-500 text-[12px] leading-relaxed mt-0.5">${f.desc}</p></div></li>`).join('') + '</ul>';
|
|
|
|
|
+
|
|
|
|
|
+ document.getElementById('content-area').innerHTML = `
|
|
|
|
|
+ <div class="w-full h-[150px] overflow-hidden mb-4 rounded-sm"><img src="${data.imageSrc}" class="w-full h-full object-cover"></div>
|
|
|
|
|
+ <h2 class="text-xl font-medium text-gray-900 mb-1.5">${data.title}</h2>
|
|
|
|
|
+ <p class="text-[13px] text-gray-500 leading-snug">${data.subtitle}</p>
|
|
|
|
|
+ ${buttonHTML}
|
|
|
|
|
+ ${featuresHTML}
|
|
|
|
|
+ `;
|
|
|
|
|
+ }
|
|
|
|
|
+ function switchTab(tabId) { currentHomeTab = tabId; renderHomePage(); }
|
|
|
|
|
+
|
|
|
|
|
+ // --- ====== View B: 专区页逻辑 (包含精彩活动) ====== ---
|
|
|
|
|
+ function renderZonePage() {
|
|
|
|
|
+ // (简化的层级数据,确保框架完整)
|
|
|
|
|
+ const isAdvanced = ['premier', 'elite', 'global'].includes(currentUserLevel);
|
|
|
|
|
+ const isPointsExpanded = isAdvanced;
|
|
|
|
|
+
|
|
|
|
|
+ let html = `<div class="w-full h-2 bg-transparent shrink-0"></div>`; // Placeholder top
|
|
|
|
|
+
|
|
|
|
|
+ // 积分与常用兑换 (省略具体判断,展示全貌)
|
|
|
|
|
+ html += `
|
|
|
|
|
+ <div class="bg-white px-5 py-5 pb-8 mb-2 shadow-sm border-b border-gray-100">
|
|
|
|
|
+ <div class="flex justify-between items-center mb-5">
|
|
|
|
|
+ <h3 class="text-[16px] font-medium text-gray-900">积分商城</h3>
|
|
|
|
|
+ <div class="text-[13px] text-gray-900 font-medium flex items-center">进入积分商城 <svg class="w-4 h-4 ml-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 18l6-6-6-6"/></svg></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex justify-between items-center py-2 border-b border-transparent">
|
|
|
|
|
+ <div><div class="text-[20px] font-medium text-gray-800">3,000,000</div><div class="text-[12px] text-gray-400 mt-1">我的总积分</div></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="mt-6">
|
|
|
|
|
+ <div class="flex justify-between items-center mb-4">
|
|
|
|
|
+ <h3 class="text-[16px] font-medium text-gray-900">常用兑换</h3>
|
|
|
|
|
+ <div class="text-[13px] text-gray-800 flex items-center font-medium">${icons.doc}积分明细</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex overflow-x-auto no-scrollbar gap-3 pb-2 snap-x">
|
|
|
|
|
+ <div class="min-w-[100px] bg-white border border-gray-200 rounded-sm flex flex-col items-center snap-start shadow-sm"><div class="w-full h-[65px] bg-[#f7fbff] flex items-center justify-center">${icons.planeRed}</div><div class="text-[13px] text-gray-700 py-2.5">航空里程</div></div>
|
|
|
|
|
+ <div class="min-w-[100px] bg-white border border-gray-200 rounded-sm flex flex-col items-center snap-start shadow-sm"><div class="w-full h-[65px] bg-[#fffaf5] flex items-center justify-center">${icons.coffee}</div><div class="text-[13px] text-gray-700 py-2.5">贵宾厅</div></div>
|
|
|
|
|
+ <div class="min-w-[100px] bg-white border border-gray-200 rounded-sm flex flex-col items-center snap-start shadow-sm"><div class="w-full h-[65px] bg-[#f9fafb] flex items-center justify-center"><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#666" stroke-width="1.5"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/></svg></div><div class="text-[13px] text-gray-700 py-2.5">年费</div></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex justify-end mt-6">
|
|
|
|
|
+ <div class="text-[12px] text-gray-900 font-medium flex items-center cursor-pointer" onclick="openRuleModal()">${icons.doc} 积分规则</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ `;
|
|
|
|
|
+
|
|
|
|
|
+ // 【新增】精彩活动模块 (6个等级都有)
|
|
|
|
|
+ html += `
|
|
|
|
|
+ <div class="bg-white pb-8 shadow-sm">
|
|
|
|
|
+ <div class="px-5 py-5 flex justify-between items-center">
|
|
|
|
|
+ <h3 class="text-[18px] font-medium text-gray-900">精彩活动</h3>
|
|
|
|
|
+ <div class="text-[13px] text-gray-900 font-medium flex items-center cursor-pointer" onclick="showMyActivities()">我的活动 ${icons.chevronRight}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 轮播大图卡片 -->
|
|
|
|
|
+ <div class="px-5 mb-8">
|
|
|
|
|
+ <div class="w-full bg-white flex flex-col cursor-pointer active:opacity-90 transition shadow-sm border border-gray-100 rounded-b-sm" onclick="openActivityDetail('normal')">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800&auto=format&fit=crop" class="w-full h-[160px] object-cover">
|
|
|
|
|
+ <div class="p-4">
|
|
|
|
|
+ <h4 class="text-[17px] text-gray-900 font-bold mb-2 truncate">汇丰层层升级礼</h4>
|
|
|
|
|
+ <div class="text-[13px] text-gray-500 mb-1.5">线上活动</div>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400 flex items-center">${icons.clock} 2026/1/1 8:00 - 2026/3/31 23:29</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex justify-center gap-2 mt-4">
|
|
|
|
|
+ <div class="w-[4px] h-[4px] bg-black rounded-full border border-black"></div>
|
|
|
|
|
+ <div class="w-[4px] h-[4px] border border-black rounded-full"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 活动列表 -->
|
|
|
|
|
+ <div class="px-5">
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 border-b border-gray-100 cursor-pointer active:bg-gray-50" onclick="openActivityDetail('normal')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=100&h=100&fit=crop" class="w-[60px] h-[60px] object-cover shrink-0 rounded-[2px]">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[15px] text-gray-900 font-medium truncate mb-1">汇丰卓越理财新户达标礼</h4>
|
|
|
|
|
+ <div class="text-[13px] text-gray-500 mb-0.5">线上活动</div>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026/1/1 8:00 - 2026/3/31 23:29</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ ${icons.chevronRight}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 border-b border-gray-100 cursor-pointer active:bg-gray-50" onclick="openActivityDetail('normal')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?w=100&h=100&fit=crop" class="w-[60px] h-[60px] object-cover shrink-0 rounded-[2px]">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[15px] text-gray-900 font-medium truncate mb-1">汇丰 1+1 新客户礼遇</h4>
|
|
|
|
|
+ <div class="text-[13px] text-gray-500 mb-0.5">线上活动</div>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026/1/1 8:00 - 2026/3/31 23:29</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ ${icons.chevronRight}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 border-b border-gray-100 cursor-pointer active:bg-gray-50" onclick="openActivityDetail('normal')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=100&h=100&fit=crop" class="w-[60px] h-[60px] object-cover shrink-0 rounded-[2px]">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[15px] text-gray-900 font-medium truncate mb-1">汇丰财富峰会</h4>
|
|
|
|
|
+ <div class="text-[13px] text-gray-500 mb-0.5">线下活动</div>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026/1/1 8:00 - 2026/3/31 23:29</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ ${icons.chevronRight}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <button onclick="showAllActivities()" class="w-full py-3 mt-6 bg-[#f7f7f7] text-[#333] font-medium border border-[#ddd] rounded-sm text-[14px] active:bg-gray-200 transition">
|
|
|
|
|
+ 更多活动
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ `;
|
|
|
|
|
+ document.getElementById('zone-content-area').innerHTML = html;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // --- ====== View Navigation ====== ---
|
|
|
|
|
+ function showZone() {
|
|
|
|
|
+ renderZonePage();
|
|
|
|
|
+ document.getElementById('home-view').classList.add('-translate-x-full');
|
|
|
|
|
+ document.getElementById('zone-view').classList.remove('translate-x-full');
|
|
|
|
|
+ }
|
|
|
|
|
+ function hideZone() {
|
|
|
|
|
+ document.getElementById('home-view').classList.remove('-translate-x-full');
|
|
|
|
|
+ document.getElementById('zone-view').classList.add('translate-x-full');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function showMyActivities() { document.getElementById('my-activities-view').classList.remove('translate-x-full'); }
|
|
|
|
|
+ function closeMyActivities() { document.getElementById('my-activities-view').classList.add('translate-x-full'); }
|
|
|
|
|
+
|
|
|
|
|
+ function showAllActivities() {
|
|
|
|
|
+ renderAllActivitiesList();
|
|
|
|
|
+ document.getElementById('all-activities-view').classList.remove('translate-x-full');
|
|
|
|
|
+ document.getElementById('data-control-wrapper').classList.remove('hidden');
|
|
|
|
|
+ }
|
|
|
|
|
+ function closeAllActivities() {
|
|
|
|
|
+ document.getElementById('all-activities-view').classList.add('translate-x-full');
|
|
|
|
|
+ document.getElementById('data-control-wrapper').classList.add('hidden');
|
|
|
|
|
+ if(isDataPanelOpen) toggleDataPanel();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function openActivityDetail(source) {
|
|
|
|
|
+ document.getElementById('activity-detail-view').classList.remove('translate-x-full');
|
|
|
|
|
+ // 根据入口设置按钮
|
|
|
|
|
+ if (source === 'my_activity') setDetailBtnState('progress');
|
|
|
|
|
+ else setDetailBtnState('enroll');
|
|
|
|
|
+
|
|
|
|
|
+ // 面板切换
|
|
|
|
|
+ document.getElementById('data-control-wrapper').classList.add('hidden');
|
|
|
|
|
+ document.getElementById('detail-control-wrapper').classList.remove('hidden');
|
|
|
|
|
+ document.getElementById('detail-control-wrapper').classList.add('flex');
|
|
|
|
|
+ }
|
|
|
|
|
+ function closeActivityDetail() {
|
|
|
|
|
+ document.getElementById('activity-detail-view').classList.add('translate-x-full');
|
|
|
|
|
+ document.getElementById('detail-control-wrapper').classList.add('hidden');
|
|
|
|
|
+ document.getElementById('detail-control-wrapper').classList.remove('flex');
|
|
|
|
|
+ if(isDetailBtnPanelOpen) toggleDetailBtnPanel();
|
|
|
|
|
+ if(isEnrollResultPanelOpen) toggleEnrollResultPanel();
|
|
|
|
|
+ if(!document.getElementById('all-activities-view').classList.contains('translate-x-full')) {
|
|
|
|
|
+ document.getElementById('data-control-wrapper').classList.remove('hidden');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // --- ====== Tabs Logic ====== ---
|
|
|
|
|
+ function switchActivitiesTab(tabId) {
|
|
|
|
|
+ const tabs = ['ongoing', 'ended'];
|
|
|
|
|
+ tabs.forEach(t => {
|
|
|
|
|
+ document.getElementById(`tab-my-${t}`).className = t === tabId ? 'flex-1 py-3 text-[15px] font-medium text-gray-900 text-center' : 'flex-1 py-3 text-[15px] font-medium text-gray-500 text-center';
|
|
|
|
|
+ const content = document.getElementById(`activities-${t}-content`);
|
|
|
|
|
+ if(t === tabId) content.classList.remove('hidden'); else content.classList.add('hidden');
|
|
|
|
|
+ });
|
|
|
|
|
+ document.getElementById('my-activities-indicator').style.left = tabId === 'ongoing' ? '0%' : '50%';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function switchAllActivitiesTab(tab) {
|
|
|
|
|
+ currentAllActivitiesTab = tab;
|
|
|
|
|
+ document.getElementById('tab-all-online').className = tab === 'online' ? 'flex-1 py-3 text-[14px] font-medium text-gray-900 text-center' : 'flex-1 py-3 text-[14px] font-medium text-gray-500 text-center';
|
|
|
|
|
+ document.getElementById('tab-all-offline').className = tab === 'offline' ? 'flex-1 py-3 text-[14px] font-medium text-gray-900 text-center' : 'flex-1 py-3 text-[14px] font-medium text-gray-500 text-center';
|
|
|
|
|
+ document.getElementById('all-activities-indicator').style.left = tab === 'online' ? '0%' : '50%';
|
|
|
|
|
+ renderAllActivitiesList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function switchDetailTier(tier) {
|
|
|
|
|
+ document.getElementById('detail-tier-indicator').style.left = `${(tier - 1) * 25}%`;
|
|
|
|
|
+ for (let i = 1; i <= 4; i++) {
|
|
|
|
|
+ document.getElementById(`tier-tab-${i}`).className = i === tier ? 'flex-1 py-3 text-[14px] font-medium text-gray-900 text-center' : 'flex-1 py-3 text-[14px] font-medium text-gray-500 text-center';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // --- ====== Data Logic ====== ---
|
|
|
|
|
+ function setAllActivitiesData(hasData) {
|
|
|
|
|
+ hasAllActivitiesData = hasData;
|
|
|
|
|
+ document.getElementById('btn-data-true').className = hasData ? 'px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium' : 'px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition';
|
|
|
|
|
+ document.getElementById('btn-data-false').className = !hasData ? 'px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium' : 'px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition';
|
|
|
|
|
+ renderAllActivitiesList();
|
|
|
|
|
+ toggleDataPanel();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function renderAllActivitiesList() {
|
|
|
|
|
+ const container = document.getElementById('all-activities-content');
|
|
|
|
|
+ if (!hasAllActivitiesData) {
|
|
|
|
|
+ container.innerHTML = `<div class="flex flex-col items-center justify-center pt-24 text-gray-400"><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" class="mb-4"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg><p class="text-[14px]">暂无可参与活动</p></div>`;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const list = currentAllActivitiesTab === 'online' ? [1,2,3,4] : [1,2];
|
|
|
|
|
+ const suffix = currentAllActivitiesTab === 'online' ? '线上' : '线下';
|
|
|
|
|
+
|
|
|
|
|
+ let html = list.map(i => `
|
|
|
|
|
+ <div class="flex items-center justify-between py-4 px-5 border-b border-gray-100 cursor-pointer active:bg-gray-50 transition" onclick="openActivityDetail('normal')">
|
|
|
|
|
+ <div class="flex items-center gap-4 w-full pr-2">
|
|
|
|
|
+ <img src="https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=100&h=100&fit=crop" class="w-[60px] h-[60px] object-cover shrink-0 rounded-[2px]">
|
|
|
|
|
+ <div class="flex-1 overflow-hidden">
|
|
|
|
|
+ <h4 class="text-[15px] text-gray-900 font-medium truncate mb-1">汇丰${suffix}活动示例 ${i}</h4>
|
|
|
|
|
+ <div class="text-[12px] text-gray-400">2026/09/20 周六 14:00</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ ${icons.chevronRight}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ `).join('');
|
|
|
|
|
+ container.innerHTML = html;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // --- ====== Panels & Modals ====== ---
|
|
|
|
|
+ function toggleSimPanel() {
|
|
|
|
|
+ isSimPanelOpen = !isSimPanelOpen;
|
|
|
|
|
+ const panel = document.getElementById('sim-panel');
|
|
|
|
|
+ isSimPanelOpen ? panel.classList.remove('scale-0', 'opacity-0', 'pointer-events-none') : panel.classList.add('scale-0', 'opacity-0', 'pointer-events-none');
|
|
|
|
|
+ }
|
|
|
|
|
+ function toggleDataPanel() {
|
|
|
|
|
+ isDataPanelOpen = !isDataPanelOpen;
|
|
|
|
|
+ const panel = document.getElementById('data-panel');
|
|
|
|
|
+ isDataPanelOpen ? panel.classList.remove('scale-0', 'opacity-0', 'pointer-events-none') : panel.classList.add('scale-0', 'opacity-0', 'pointer-events-none');
|
|
|
|
|
+ }
|
|
|
|
|
+ function toggleDetailBtnPanel() {
|
|
|
|
|
+ isDetailBtnPanelOpen = !isDetailBtnPanelOpen;
|
|
|
|
|
+ const panel = document.getElementById('detail-btn-panel');
|
|
|
|
|
+ if (isDetailBtnPanelOpen) { panel.classList.remove('scale-0', 'opacity-0', 'pointer-events-none'); if(isEnrollResultPanelOpen) toggleEnrollResultPanel(); }
|
|
|
|
|
+ else panel.classList.add('scale-0', 'opacity-0', 'pointer-events-none');
|
|
|
|
|
+ }
|
|
|
|
|
+ function toggleEnrollResultPanel() {
|
|
|
|
|
+ isEnrollResultPanelOpen = !isEnrollResultPanelOpen;
|
|
|
|
|
+ const panel = document.getElementById('enroll-result-panel');
|
|
|
|
|
+ if (isEnrollResultPanelOpen) { panel.classList.remove('scale-0', 'opacity-0', 'pointer-events-none'); if(isDetailBtnPanelOpen) toggleDetailBtnPanel(); }
|
|
|
|
|
+ else panel.classList.add('scale-0', 'opacity-0', 'pointer-events-none');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function setUserLevel(level) {
|
|
|
|
|
+ currentUserLevel = level;
|
|
|
|
|
+ currentHomeTab = ['prospect', 'credit_only', 'advance'].includes(level) ? 'premier' : level;
|
|
|
|
|
+ renderHomePage();
|
|
|
|
|
+ if(!document.getElementById('zone-view').classList.contains('translate-x-full')) renderZonePage();
|
|
|
|
|
+
|
|
|
|
|
+ ['prospect', 'credit_only', 'advance', 'premier', 'elite', 'global'].forEach(lvl => {
|
|
|
|
|
+ document.getElementById(`btn-state-${lvl}`).className = lvl === currentUserLevel ? 'px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium' : 'px-2 py-1.5 rounded bg-gray-100 text-gray-700 hover:bg-gray-200 transition';
|
|
|
|
|
+ });
|
|
|
|
|
+ if(isSimPanelOpen) toggleSimPanel();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function setDetailBtnState(state) {
|
|
|
|
|
+ currentDetailBtnState = state;
|
|
|
|
|
+ ['enroll', 'progress', 'benefits', 'more'].forEach(s => {
|
|
|
|
|
+ document.getElementById(`btn-detail-${s}`).className = s === state ? 'px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium' : 'px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition';
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const mainBtn = document.getElementById('detail-main-btn');
|
|
|
|
|
+ if(state === 'enroll') mainBtn.innerText = '报名';
|
|
|
|
|
+ if(state === 'progress') mainBtn.innerText = '查看进度';
|
|
|
|
|
+ if(state === 'benefits') mainBtn.innerText = '查看权益';
|
|
|
|
|
+ if(state === 'more') mainBtn.innerText = '查看更多';
|
|
|
|
|
+
|
|
|
|
|
+ document.getElementById('enroll-result-control').classList.toggle('hidden', state !== 'enroll');
|
|
|
|
|
+ if(state !== 'enroll' && isEnrollResultPanelOpen) toggleEnrollResultPanel();
|
|
|
|
|
+ if(isDetailBtnPanelOpen) toggleDetailBtnPanel();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function setEnrollCondition(cond) {
|
|
|
|
|
+ currentEnrollCondition = cond;
|
|
|
|
|
+ ['success', 'not_eligible', 'full', 'exclusive'].forEach(c => {
|
|
|
|
|
+ document.getElementById(`cond-${c}`).className = c === cond ? 'px-2 py-1.5 rounded bg-[#d70014] text-white transition font-medium' : 'px-2 py-1.5 rounded bg-gray-100 text-gray-700 transition';
|
|
|
|
|
+ });
|
|
|
|
|
+ if(isEnrollResultPanelOpen) toggleEnrollResultPanel();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function handleDetailAction() {
|
|
|
|
|
+ if (currentDetailBtnState === 'more') {
|
|
|
|
|
+ closeActivityDetail();
|
|
|
|
|
+ showAllActivities();
|
|
|
|
|
+ } else if (currentDetailBtnState === 'progress') {
|
|
|
|
|
+ showToast('正在为您拉取达标进度...');
|
|
|
|
|
+ } else if (currentDetailBtnState === 'benefits') {
|
|
|
|
|
+ showToast('正在为您拉取权益信息...');
|
|
|
|
|
+ } else if (currentDetailBtnState === 'enroll') {
|
|
|
|
|
+ if (currentEnrollCondition === 'success') {
|
|
|
|
|
+ document.getElementById('confirm-modal-backdrop').classList.remove('opacity-0', 'pointer-events-none');
|
|
|
|
|
+ document.getElementById('confirm-modal').classList.remove('translate-y-full');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let msg = currentEnrollCondition === 'not_eligible' ? '您暂不符合报名条件' : currentEnrollCondition === 'full' ? '很遗憾,该活动报名已满。' : '您已参与同类型活动,不可重复报名 (互斥)';
|
|
|
|
|
+ document.getElementById('alert-modal-msg').innerText = msg;
|
|
|
|
|
+ document.getElementById('alert-modal-backdrop').classList.remove('opacity-0', 'pointer-events-none');
|
|
|
|
|
+ document.getElementById('alert-modal').classList.remove('translate-y-full');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function openRuleModal() { document.getElementById('rule-modal-backdrop').classList.remove('opacity-0', 'pointer-events-none'); document.getElementById('rule-modal').classList.remove('translate-y-full'); }
|
|
|
|
|
+ function closeRuleModal() { document.getElementById('rule-modal-backdrop').classList.add('opacity-0', 'pointer-events-none'); document.getElementById('rule-modal').classList.add('translate-y-full'); }
|
|
|
|
|
+ function openBalanceRuleModal() { document.getElementById('balance-rule-modal-backdrop').classList.remove('opacity-0', 'pointer-events-none'); document.getElementById('balance-rule-modal').classList.remove('translate-y-full'); }
|
|
|
|
|
+ function closeBalanceRuleModal() { document.getElementById('balance-rule-modal-backdrop').classList.add('opacity-0', 'pointer-events-none'); document.getElementById('balance-rule-modal').classList.add('translate-y-full'); }
|
|
|
|
|
+ function closeAlertModal() { document.getElementById('alert-modal-backdrop').classList.add('opacity-0', 'pointer-events-none'); document.getElementById('alert-modal').classList.add('translate-y-full'); }
|
|
|
|
|
+ function closeConfirmModal() { document.getElementById('confirm-modal-backdrop').classList.add('opacity-0', 'pointer-events-none'); document.getElementById('confirm-modal').classList.add('translate-y-full'); }
|
|
|
|
|
+
|
|
|
|
|
+ let toastTimeout;
|
|
|
|
|
+ function showToast(msg) {
|
|
|
|
|
+ const toast = document.getElementById('toast');
|
|
|
|
|
+ toast.innerText = msg;
|
|
|
|
|
+ toast.classList.remove('opacity-0');
|
|
|
|
|
+ clearTimeout(toastTimeout);
|
|
|
|
|
+ toastTimeout = setTimeout(() => { toast.classList.add('opacity-0'); }, 2000);
|
|
|
|
|
+ }
|
|
|
|
|
+ </script>
|
|
|
|
|
+</body>
|
|
|
|
|
+</html>
|