"use client" import { useState } from "react" import { useRouter } from "next/navigation" import { DeviceSelector } from "@/app/components/common/DeviceSelector" import { Button } from "@/components/ui/button" import { ChevronLeft } from "lucide-react" export default function ScenarioDevicesPage({ params }: { params: { channel: string } }) { const router = useRouter() const [selectedDevices, setSelectedDevices] = useState([]) // 获取渠道中文名称 const getChannelName = (channel: string) => { const channelMap: Record = { douyin: "抖音", kuaishou: "快手", xiaohongshu: "小红书", weibo: "微博", haibao: "海报", phone: "电话", order: "订单", weixinqun: "微信群", gongzhonghao: "公众号", payment: "付款码", api: "API", } return channelMap[channel] || channel } const channelName = getChannelName(params.channel) const handleSave = async () => { try { // 这里应该是实际的API调用来保存选中的设备 await new Promise((resolve) => setTimeout(resolve, 1000)) router.back() } catch (error) { console.error("保存失败:", error) } } return (

{channelName}设备选择

) }