"use client" import { CheckCircle, Clock, DollarSign, ListOrdered, Star, TrendingUp, Users } from "lucide-react" import Link from "next/link" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Progress } from "@/components/ui/progress" import { statusLabels } from "@/lib/constants" import { mockOrders, mockPlayers, mockServices, mockShops } from "@/lib/mock" import { useAuthStore } from "@/store/auth" export default function DashboardPage() { const { currentRole } = useAuthStore() const isOwner = currentRole === "owner" const player = mockPlayers[0] const shop = mockShops[0] const recentOrders = mockOrders.slice(0, 3) return (

概览

总订单
{isOwner ? shop.totalOrders : player.totalOrders}
评分
{isOwner ? shop.rating : player.rating}
{isOwner ? "签约打手" : "完成率"} {isOwner ? ( ) : ( )} {isOwner ? (
{shop.playerCount}
) : (
{(player.completionRate * 100).toFixed(0)}%
)}
{isOwner ? "本月收入" : "服务数"} {isOwner ? ( ) : ( )}
{isOwner ? "¥12,800" : mockServices.filter((s) => s.playerId === player.id).length}
最近订单
{recentOrders.map((order) => (

{order.service.title}

{order.consumerName} → {order.playerName}

¥{order.totalPrice} {statusLabels[order.status]}
))}
{!isOwner && ( 快捷操作 )}
) }