"use client" import { useState, useEffect } from "react" import { useStore } from "@/lib/store" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Switch } from "@/components/ui/switch" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { Save, RefreshCw, Smartphone, CreditCard, ExternalLink, Bitcoin, Globe, Copy, Check, HelpCircle, } from "lucide-react" export default function PaymentConfigPage() { const { settings, updateSettings, fetchSettings } = useStore() const [loading, setLoading] = useState(false) const [localSettings, setLocalSettings] = useState(settings.paymentMethods) const [copied, setCopied] = useState("") useEffect(() => { setLocalSettings(settings.paymentMethods) }, [settings.paymentMethods]) const handleSave = async () => { setLoading(true) updateSettings({ paymentMethods: localSettings }) await new Promise((resolve) => setTimeout(resolve, 800)) setLoading(false) alert("配置已保存!") } const handleRefresh = async () => { setLoading(true) await fetchSettings() setLoading(false) } const handleCopy = (text: string, field: string) => { navigator.clipboard.writeText(text) setCopied(field) setTimeout(() => setCopied(""), 2000) } const updateWechat = (field: string, value: any) => { setLocalSettings((prev) => ({ ...prev, wechat: { ...prev.wechat, [field]: value }, })) } const updateAlipay = (field: string, value: any) => { setLocalSettings((prev) => ({ ...prev, alipay: { ...prev.alipay, [field]: value }, })) } const updateUsdt = (field: string, value: any) => { setLocalSettings((prev) => ({ ...prev, usdt: { ...prev.usdt, [field]: value }, })) } const updatePaypal = (field: string, value: any) => { setLocalSettings((prev) => ({ ...prev, paypal: { ...prev.paypal, [field]: value }, })) } return (
配置微信、支付宝、USDT、PayPal等支付参数
如何获取微信群跳转链接?
提示:微信群二维码7天后失效,建议使用活码工具
用户点击微信支付后显示的二维码图片URL
用户支付成功后将自动跳转到此链接,进入指定微信群
用户点击支付宝支付后显示的二维码