File size: 11,052 Bytes
25b8647 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | import React, { useState } from "react";
import { ScreenId, AppState } from "../types";
import { ArrowLeft, Headphones, Send, ChevronDown, ChevronUp, BellRing } from "lucide-react";
interface CustomerSupportViewProps {
state: AppState;
onNavigate: (screen: ScreenId) => void;
}
export const CustomerSupportView: React.FC<CustomerSupportViewProps> = ({ state, onNavigate }) => {
const [openFaq, setOpenFaq] = useState<number | null>(null);
const [typedMessage, setTypedMessage] = useState("");
const [chatLog, setChatLog] = useState<{ sender: "user" | "bot"; text: string; time: string }[]>([
{
sender: "bot",
text: "您好!我是盛大 24 小时智能金牌客服。请问有什么可以帮您?",
time: "刚刚"
}
]);
const toggleFaq = (idx: number) => {
setOpenFaq(openFaq === idx ? null : idx);
};
const handleSendMessage = (e: React.FormEvent) => {
e.preventDefault();
if (!typedMessage.trim()) return;
const userText = typedMessage.trim();
const nowStr = new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
setChatLog(prev => [...prev, { sender: "user", text: userText, time: nowStr }]);
setTypedMessage("");
// Simulate smart support auto response base on keyword
setTimeout(() => {
let reply = "收到您的咨询。由于当前人工客服咨询量较大,为您推荐自助提速服务。如属于充值未到账,请在充值中心重新提交一遍订单重试;提现请耐心期待,一般 3-15 分钟极速到账。";
if (userText.includes("充值") || userText.includes("充钱")) {
reply = "【充值充能提速】如您充值未到账,请确认支付扣款成功。由于区块链或银行接口或有延迟,请耐心期待 3 分钟;或者将【订单编号、支付截图、您的会员ID】发送在这里,我们将在 1 分钟内为您手工录入。";
} else if (userText.includes("提现") || userText.includes("提款") || userText.includes("出金")) {
reply = "【提现到账说明】盛大娱乐城支持 24 小时无上限直提。正常提现预计 3-15 分钟内自动汇出。如超过 1 小时未到账,请联系对接专员帮您查看通道。";
} else if (userText.includes("活动") || userText.includes("红利") || userText.includes("返水")) {
reply = "【活动红利领取】每周返水、晋级礼金可在“优惠活动中心”一键领取。点击对应活动,即可看到自动匹配的流水要求和一键申领按钮。";
}
setChatLog(prev => [...prev, { sender: "bot", text: reply, time: nowStr }]);
}, 1000);
};
const FAQS = [
{
q: "💰 如何进行快速充值入金?",
a: "您可以在“充值中心”选择 USDT (TRC25)、微信扫码、支付宝或银行卡进行充值。对于数字货币充值,系统在检测到链上1个确认后即在 30 秒内自动充值到您的账户余额中,无需人工核实。"
},
{
q: "🏦 提现需要多长时间到账?有手续费吗?",
a: "提现中心全面支持 7x24 小时极速打款。单笔提现在 1-3 分钟内即可直接汇入您的绑定银行卡或 TRC20 钱包地址。盛大承诺:提现一律 0 手续费、0 扣税,绝对安全可靠。"
},
{
q: "🔒 为什么显示“未登录”可以进行游戏吗?",
a: "未登录用户默认只能浏览极速分类。如需享受极速试玩和真实赢利直提,可以点击任意界面的“登录/注册”或者“一键游客试玩”获取 10,000 美金测试额度,即刻畅快下注。"
},
{
q: "⭐️ VIP 周返水和晋级礼金如何计算?",
a: "作为 VIP 4-6 会员,您尊享每周高达 0.8% - 1.0% 的无上限投注返水,晋级礼金最高可达 ¥1,888.00。每周一中午 12:00 返水将自动发放到账,直接享受提款特权。"
}
];
return (
<div className="bg-[#000B14] text-[#d1e4ff] min-h-screen pb-6 font-sans flex flex-col justify-between select-none">
{/* Header Container */}
<header className="bg-[#0b2135] h-14 border-b border-[#414755] flex items-center px-4 relative sticky top-0 z-40">
<button
aria-label="Go back"
onClick={() => onNavigate(ScreenId.HOME)}
className="p-1.5 rounded-full text-[#afc6ff] hover:bg-[#22364c] transition-colors"
>
<ArrowLeft className="w-6 h-6" />
</button>
<span className="text-white text-base font-bold absolute left-1/2 -translate-x-1/2">
盛大极速在线客服
</span>
</header>
{/* Hero Welcome Unit */}
<section className="bg-gradient-to-b from-[#0b2135] to-[#000F20] py-6 px-4 text-center border-b border-white/5">
<div className="w-16 h-16 rounded-full bg-[#528dff]/20 border border-[#528dff]/40 flex items-center justify-center mx-auto mb-3 shadow-[0_0_20px_rgba(82,141,255,0.2)]">
<Headphones className="w-8 h-8 text-[#528dff] animate-bounce" />
</div>
<h2 className="text-sm font-bold text-white uppercase">24/7 专属金牌尊享客服</h2>
<p className="text-[11px] text-[#c1c6d7] mt-1 pr-6 pl-6">
您好!港资直营实体背书。全天候 24 小时为您提供充提、金流加速、特权晋升与红利审核答疑服务,无惧任何风控,大额无忧。
</p>
{/* Action button triggers for official channels */}
<div className="grid grid-cols-2 gap-3 mt-4 max-w-sm mx-auto">
<a
href="https://t.me/sdyl_vip"
target="_blank"
rel="noopener noreferrer"
onClick={(e) => { e.preventDefault(); alert("正在为您跳转至 Telegram 盛大特权客服专员..."); }}
className="bg-[#229ED9]/20 hover:bg-[#229ED9]/30 text-white rounded-xl py-2 flex items-center justify-center gap-1.5 text-xs font-semibold border border-[#229ED9]/30 transition-all cursor-pointer"
>
<span>Telegram 专道</span>
</a>
<a
href="https://wa.me/sdyl_ph"
target="_blank"
rel="noopener noreferrer"
onClick={(e) => { e.preventDefault(); alert("正在为您跳转至 WhatsApp 在线技术支持..."); }}
className="bg-[#25D366]/20 hover:bg-[#25D366]/30 text-white rounded-xl py-2 flex items-center justify-center gap-1.5 text-xs font-semibold border border-[#25D366]/30 transition-all cursor-pointer"
>
<span>WhatsApp 专线</span>
</a>
</div>
</section>
{/* Live Interactive Chat Area */}
<section className="p-4 flex-1 flex flex-col gap-3">
<div className="text-[10px] text-[#c1c6d7]/60 font-semibold tracking-wider text-center uppercase">
智能互动聊天室 (Type below to interact)
</div>
<div className="bg-[#0b2135]/50 border border-white/5 rounded-xl p-3 flex-1 flex flex-col gap-2 min-h-[180px] h-[220px] overflow-y-auto">
{chatLog.map((chat, idx) => (
<div
key={idx}
className={`flex flex-col max-w-[85%] ${chat.sender === "user" ? "self-end items-end" : "self-start items-start"}`}
>
<div
className={`p-2.5 rounded-2xl text-xs leading-relaxed ${
chat.sender === "user"
? "bg-[#528dff] text-[#00275f] font-medium rounded-tr-none"
: "bg-[#22364c] text-[#d1e4ff] rounded-tl-none border border-white/5"
}`}
>
{chat.text}
</div>
<span className="text-[9px] text-[#c1c6d7] opacity-60 mt-1 px-1">{chat.time}</span>
</div>
))}
</div>
{/* Input box */}
<form onSubmit={handleSendMessage} className="flex gap-2">
<input
type="text"
value={typedMessage}
onChange={(e) => setTypedMessage(e.target.value)}
placeholder="打字输入充提未到账或活动咨询..."
className="flex-1 bg-[#001428] border border-[#414755]/50 rounded-xl px-4 py-2 text-xs text-white placeholder-slate-500 focus:outline-none focus:border-[#528dff]"
/>
<button
type="submit"
className="px-4 py-2 bg-[#528dff] hover:bg-[#528dff]/90 text-[#00275f] font-bold rounded-xl text-xs transition-transform active:scale-95 cursor-pointer flex items-center gap-1"
>
<span>发送</span>
<Send className="w-3 h-3" />
</button>
</form>
</section>
{/* Accordion List FAQ */}
<section className="px-4 mt-2">
<h3 className="text-xs font-bold text-white mb-2 tracking-wider flex items-center gap-1">
<BellRing className="w-4 h-4 text-amber-500" /> 常见热点问题指南 (Click to view)
</h3>
<div className="space-y-2">
{FAQS.map((faq, idx) => (
<div
key={idx}
className="bg-[#0b2135] border border-white/5 rounded-xl overflow-hidden transition-all"
>
<button
onClick={() => toggleFaq(idx)}
className="w-full text-left p-3 flex justify-between items-center hover:bg-[#22364c]/20 transition-colors"
>
<span className="text-xs font-semibold text-[#afc6ff]">{faq.q}</span>
{openFaq === idx ? (
<ChevronUp className="w-4 h-4 text-[#c1c6d7]" />
) : (
<ChevronDown className="w-4 h-4 text-[#c1c6d7]" />
)}
</button>
{openFaq === idx && (
<div className="p-3 bg-[#071d31] border-t border-white/5 text-[11px] text-[#c1c6d7] leading-relaxed">
{faq.a}
</div>
)}
</div>
))}
</div>
</section>
{/* Safety Policy Claims */}
<footer className="mt-8 px-4 py-3 border-t border-white/5 text-center">
<div className="flex justify-center gap-4 text-[10px] text-[#afc6ff]">
<a onClick={() => alert("盛大服务条款已加载:安全博彩、防止低龄行为。")} className="hover:underline cursor-pointer">服务条款</a>
<span className="text-white/10">•</span>
<a onClick={() => alert("本平台隐私政策承诺绝不公开或向任何第三方透露您的IP及资金往来地址。")} className="hover:underline cursor-pointer">隐私政策</a>
<span className="text-white/10">•</span>
<a onClick={() => alert("责任博彩:理性娱乐,健康游戏。")} className="hover:underline cursor-pointer">责任博彩</a>
</div>
<p className="text-[9px] text-[#c1c6d7]/60 mt-1">
盛大国际娱乐城(SDYL.PH)特权加密通道. 客户信息由瑞安全天候监控.
</p>
</footer>
</div>
);
};
|