Files
juwan-frontend/lib/mock-data.ts
T

737 lines
18 KiB
TypeScript

import type {
ChatMessage,
ChatSession,
Comment,
Dispute,
Favorite,
Game,
Notification,
Order,
Player,
PlayerService,
Post,
Review,
Shop,
User,
WalletTransaction,
} from "./types"
export const mockUsers: User[] = [
{
id: "u1",
username: "xm_2003",
nickname: "小明",
avatar: "/avatars/u1.jpg",
role: "consumer",
phone: "138****1234",
bio: "工作日打两三把,周末偶尔通宵",
createdAt: "2025-01-15",
},
{
id: "u2",
username: "LDShen666",
nickname: "老李",
avatar: "/avatars/u2.jpg",
role: "player",
phone: "139****5678",
bio: "晚上在线多,逆风不摆,能语音更快",
createdAt: "2024-11-20",
},
{
id: "u3",
username: "wangzai77",
nickname: "王哥",
avatar: "/avatars/u3.jpg",
role: "owner",
phone: "137****9012",
bio: "店里就三个人,忙的时候回消息会慢点",
createdAt: "2024-08-10",
},
{
id: "u4",
username: "Achen9k",
nickname: "阿辰",
avatar: "/avatars/u4.jpg",
role: "player",
bio: "主狙和突破都打,报点直给",
createdAt: "2025-02-01",
},
{
id: "u5",
username: "甜甜酱w",
nickname: "甜甜酱",
avatar: "/avatars/u5.jpg",
role: "player",
bio: "主辅+原神日常,社恐,但会认真打",
createdAt: "2025-01-05",
},
]
export const mockGames: Game[] = [
{ id: "g1", name: "英雄联盟", icon: "Swords", category: "MOBA" },
{ id: "g2", name: "王者荣耀", icon: "Crown", category: "MOBA" },
{ id: "g3", name: "CS2", icon: "Crosshair", category: "FPS" },
{ id: "g4", name: "永劫无间", icon: "Flame", category: "动作" },
{ id: "g5", name: "原神", icon: "Sparkles", category: "RPG" },
{ id: "g6", name: "和平精英", icon: "Target", category: "FPS" },
{ id: "g7", name: "DOTA2", icon: "Shield", category: "MOBA" },
{ id: "g8", name: "无畏契约", icon: "Bomb", category: "FPS" },
]
export const mockServices: PlayerService[] = [
{
id: "s1",
playerId: "u2",
gameId: "g1",
gameName: "英雄联盟",
title: "LOL双排稳一点上分",
description: "主打野/中,前两把先磨合。逆风会讲思路,不闷着。",
price: 33,
unit: "局",
rankRange: "铂金-大师",
availability: ["周一至周五 20:00-01:00", "周末 14:00-02:00"],
},
{
id: "s2",
playerId: "u2",
gameId: "g2",
gameName: "王者荣耀",
title: "王者补位冲星",
description: "连跪想止损就来,射手辅助都能补。冲几星先说,我按你节奏来。",
price: 27,
unit: "星",
rankRange: "星耀-王者80星",
availability: ["每天 18:30-00:30"],
},
{
id: "s3",
playerId: "u4",
gameId: "g3",
gameName: "CS2",
title: "CS2车队位",
description: "语音里先报点,残局我来喊。不开喷,失误就下一把拉回来。",
price: 57,
unit: "局",
rankRange: "白银-超凡",
availability: ["每天 15:00-01:00"],
},
{
id: "s4",
playerId: "u5",
gameId: "g1",
gameName: "英雄联盟",
title: "LOL轻松双排",
description: "主辅位,偏保人打法。想聊天就聊,不想说话也行。",
price: 22,
unit: "局",
availability: ["周末 11:00-23:30"],
},
{
id: "s5",
playerId: "u5",
gameId: "g5",
gameName: "原神",
title: "原神日常清体力",
description: "每日委托、树脂、活动本都能清。做完发截图,不乱动你号。",
price: 19,
unit: "次",
availability: ["工作日 21:00-24:00", "周末白天可加急"],
},
]
export const mockPlayers: Player[] = [
{
id: "u2",
user: mockUsers[1],
rating: 4.5,
totalOrders: 83,
completionRate: 0.93,
status: "available",
games: ["英雄联盟", "王者荣耀"],
services: mockServices.filter((s) => s.playerId === "u2"),
shopId: "shop1",
shopName: "王者电竞工作室",
tags: ["补位稳", "会复盘", "麦克风在线"],
},
{
id: "u4",
user: mockUsers[3],
rating: 4.8,
totalOrders: 47,
completionRate: 0.96,
status: "busy",
games: ["CS2", "无畏契约"],
services: mockServices.filter((s) => s.playerId === "u4"),
tags: ["报点快", "节奏凶", "不压力队友"],
},
{
id: "u5",
user: mockUsers[4],
rating: 3.9,
totalOrders: 21,
completionRate: 0.86,
status: "available",
games: ["英雄联盟", "原神"],
services: mockServices.filter((s) => s.playerId === "u5"),
shopId: "shop1",
shopName: "王者电竞工作室",
tags: ["主辅", "不抢话", "原神日常"],
},
]
export const mockShops: Shop[] = [
{
id: "shop1",
owner: mockUsers[2],
name: "王者电竞工作室",
banner: "/banners/shop1.jpg",
description: "晚上在线的人多一点,接单前会先问清楚你想怎么打。",
rating: 4.4,
totalOrders: 68,
playerCount: 7,
commissionType: "percentage",
commissionValue: 15,
allowMultiShop: false,
allowIndependentOrders: true,
dispatchMode: "manual",
announcements: ["晚上9点后单子多,等位可能会慢", "这周加了原神日常代清,截图回传"],
templateConfig: {
sections: [
{ type: "banner", enabled: true, order: 0 },
{ type: "intro", enabled: true, order: 1 },
{ type: "announcements", enabled: true, order: 2 },
{ type: "services", enabled: true, order: 3 },
{ type: "players", enabled: true, order: 4 },
{ type: "reviews", enabled: true, order: 5 },
],
},
},
]
export const mockOrders: Order[] = [
{
id: "ord1",
consumerId: "u1",
consumerName: "小明",
playerId: "u2",
playerName: "老李",
shopId: "shop1",
shopName: "王者电竞工作室",
service: mockServices[0],
status: "pending_review",
totalPrice: 99,
note: "今晚冲三把,输了也别急",
createdAt: "2025-02-18T14:30:00",
acceptedAt: "2025-02-18T14:35:00",
closedAt: "2025-02-18T23:48:00",
completedAt: "2025-02-18T23:50:00",
},
{
id: "ord2",
consumerId: "u1",
consumerName: "小明",
playerId: "u4",
playerName: "阿辰",
service: mockServices[2],
status: "completed",
totalPrice: 116,
createdAt: "2025-02-15T10:00:00",
acceptedAt: "2025-02-15T10:05:00",
closedAt: "2025-02-15T12:30:00",
completedAt: "2025-02-15T12:35:00",
},
{
id: "ord3",
consumerId: "u1",
consumerName: "小明",
playerId: "u5",
playerName: "甜甜酱",
shopId: "shop1",
shopName: "王者电竞工作室",
service: mockServices[3],
status: "pending_accept",
totalPrice: 69,
note: "只想放松玩,不冲分",
createdAt: "2025-02-19T20:00:00",
},
{
id: "ord4",
consumerId: "u1",
consumerName: "小明",
playerId: "u2",
playerName: "老李",
shopId: "shop1",
shopName: "王者电竞工作室",
service: mockServices[1],
status: "disputed",
totalPrice: 87,
createdAt: "2025-02-10T16:00:00",
acceptedAt: "2025-02-10T16:10:00",
},
{
id: "ord5",
consumerId: "u1",
consumerName: "小明",
playerId: "u2",
playerName: "老李",
shopId: "shop1",
shopName: "王者电竞工作室",
service: mockServices[1],
status: "completed",
totalPrice: 54,
note: "补两星就收工",
createdAt: "2025-02-08T21:10:00",
acceptedAt: "2025-02-08T21:15:00",
closedAt: "2025-02-08T22:20:00",
completedAt: "2025-02-08T22:25:00",
},
{
id: "ord6",
consumerId: "u1",
consumerName: "小明",
playerId: "u5",
playerName: "甜甜酱",
shopId: "shop1",
shopName: "王者电竞工作室",
service: mockServices[4],
status: "completed",
totalPrice: 38,
note: "帮我清两天日常",
createdAt: "2025-02-06T19:40:00",
acceptedAt: "2025-02-06T19:45:00",
closedAt: "2025-02-06T20:25:00",
completedAt: "2025-02-06T20:28:00",
},
{
id: "ord7",
consumerId: "u1",
consumerName: "小明",
playerId: "u4",
playerName: "阿辰",
service: mockServices[2],
status: "completed",
totalPrice: 57,
createdAt: "2025-02-03T23:10:00",
acceptedAt: "2025-02-03T23:12:00",
closedAt: "2025-02-04T00:05:00",
completedAt: "2025-02-04T00:08:00",
},
]
export const mockReviews: Review[] = [
{
id: "r1",
orderId: "ord2",
fromUserId: "u1",
fromUserName: "小明",
fromUserAvatar: "/avatars/u1.jpg",
toUserId: "u4",
rating: 5,
content: "报点很快,架枪位也会提前说。中间崩了一把,后面拉回来了。",
sealed: false,
createdAt: "2025-02-15T13:00:00",
},
{
id: "r2",
orderId: "ord2",
fromUserId: "u4",
fromUserName: "阿辰",
fromUserAvatar: "/avatars/u4.jpg",
toUserId: "u1",
rating: 4,
content: "人挺好沟通,听指令,不会乱冲。",
sealed: false,
createdAt: "2025-02-15T13:30:00",
},
{
id: "r3",
orderId: "ord1",
fromUserId: "u1",
fromUserName: "小明",
fromUserAvatar: "/avatars/u1.jpg",
toUserId: "u2",
rating: 4,
content: "整体可以,第二把他家里来电话断了几分钟,后面补回来了。",
sealed: true,
createdAt: "2025-02-19T00:05:00",
},
{
id: "r4",
orderId: "ord5",
fromUserId: "u1",
fromUserName: "小明",
fromUserAvatar: "/avatars/u1.jpg",
toUserId: "u2",
rating: 5,
content: "补位确实稳。最后一把逆风翻了,爽。",
sealed: false,
createdAt: "2025-02-08T22:40:00",
},
{
id: "r5",
orderId: "ord5",
fromUserId: "u2",
fromUserName: "老李",
fromUserAvatar: "/avatars/u2.jpg",
toUserId: "u1",
rating: 4,
content: "配合OK,心态稳,输一局也没甩锅。",
sealed: false,
createdAt: "2025-02-08T22:45:00",
},
{
id: "r6",
orderId: "ord6",
fromUserId: "u1",
fromUserName: "小明",
fromUserAvatar: "/avatars/u1.jpg",
toUserId: "u5",
rating: 3,
content: "日常都做了,就是比我想的晚半小时。",
sealed: false,
createdAt: "2025-02-06T20:40:00",
},
{
id: "r7",
orderId: "ord6",
fromUserId: "u5",
fromUserName: "甜甜酱",
fromUserAvatar: "/avatars/u5.jpg",
toUserId: "u1",
rating: 4,
content: "需求给得清楚,省事。",
sealed: false,
createdAt: "2025-02-06T20:46:00",
},
{
id: "r8",
orderId: "ord7",
fromUserId: "u1",
fromUserName: "小明",
fromUserAvatar: "/avatars/u1.jpg",
toUserId: "u4",
rating: 5,
content: "节奏飞快,枪很硬。就是我跟得有点累哈哈。",
sealed: false,
createdAt: "2025-02-04T00:20:00",
},
{
id: "r9",
orderId: "ord7",
fromUserId: "u4",
fromUserName: "阿辰",
fromUserAvatar: "/avatars/u4.jpg",
toUserId: "u1",
rating: 5,
content: "上手快,喊点就能到。",
sealed: false,
createdAt: "2025-02-04T00:25:00",
},
]
export const mockDisputes: Dispute[] = [
{
id: "d1",
orderId: "ord4",
initiatorId: "u1",
initiatorName: "小明",
reason: "中途掉线后一直没回来,约好的上星数量没打完。",
evidence: ["/evidence/d1-1.jpg", "/evidence/d1-2.jpg"],
status: "reviewing",
createdAt: "2025-02-12T10:00:00",
},
]
export const mockChatSessions: ChatSession[] = [
{
id: "chat1",
type: "order",
orderId: "ord1",
participants: [
{ id: "u1", name: "小明", avatar: "/avatars/u1.jpg" },
{ id: "u2", name: "老李", avatar: "/avatars/u2.jpg" },
],
lastMessage: "行,20:00开",
lastMessageAt: "2025-02-18T18:30:00",
unreadCount: 2,
readonly: false,
},
{
id: "chat2",
type: "consultation",
participants: [
{ id: "u1", name: "小明", avatar: "/avatars/u1.jpg" },
{ id: "u5", name: "甜甜酱", avatar: "/avatars/u5.jpg" },
],
lastMessage: "周末还能接吗",
lastMessageAt: "2025-02-19T15:00:00",
unreadCount: 0,
readonly: false,
},
{
id: "chat3",
type: "order",
orderId: "ord2",
participants: [
{ id: "u1", name: "小明", avatar: "/avatars/u1.jpg" },
{ id: "u4", name: "阿辰", avatar: "/avatars/u4.jpg" },
],
lastMessage: "下次再组",
lastMessageAt: "2025-02-15T12:30:00",
unreadCount: 0,
readonly: true,
},
]
export const mockChatMessages: ChatMessage[] = [
{
id: "msg1",
sessionId: "chat1",
senderId: "u1",
senderName: "小明",
senderAvatar: "/avatars/u1.jpg",
type: "system",
content: "订单创建成功",
createdAt: "2025-02-18T14:35:00",
},
{
id: "msg2",
sessionId: "chat1",
senderId: "u2",
senderName: "老李",
senderAvatar: "/avatars/u2.jpg",
type: "text",
content: "在,能打。你想几把?",
createdAt: "2025-02-18T14:36:00",
},
{
id: "msg3",
sessionId: "chat1",
senderId: "u1",
senderName: "小明",
senderAvatar: "/avatars/u1.jpg",
type: "text",
content: "8点开行不",
createdAt: "2025-02-18T18:30:00",
},
{
id: "msg4",
sessionId: "chat1",
senderId: "u2",
senderName: "老李",
senderAvatar: "/avatars/u2.jpg",
type: "text",
content: "行,到点我拉你",
createdAt: "2025-02-18T18:32:00",
},
]
export const mockPosts: Post[] = [
{
id: "p1",
author: mockUsers[0],
authorRole: "consumer",
title: "CS2上分体验分享",
content: "昨晚跟阿辰打了三把,前两把顺,第三把差点翻车。总体值这个价。",
images: ["/posts/p1-1.jpg"],
tags: ["CS2", "上分", "好评"],
linkedOrderId: "ord2",
likeCount: 42,
commentCount: 8,
liked: false,
pinned: false,
createdAt: "2025-02-16T10:00:00",
},
{
id: "p2",
author: mockUsers[1],
authorRole: "player",
title: "新赛季英雄联盟上分攻略",
content: "新赛季改动有点多,先别急着硬冲分。前10分钟别乱接团,先稳住发育。",
images: [],
tags: ["英雄联盟", "攻略", "新赛季"],
likeCount: 128,
commentCount: 35,
liked: true,
pinned: true,
createdAt: "2025-02-14T08:00:00",
},
{
id: "p3",
author: mockUsers[4],
authorRole: "player",
title: "原神4.5版本日常代肝服务上线",
content: "新活动有点肝,没空的话我可以帮清日常,做完发截图。",
images: ["/posts/p3-1.jpg", "/posts/p3-2.jpg"],
tags: ["原神", "代肝", "新版本"],
likeCount: 67,
commentCount: 12,
liked: false,
pinned: false,
createdAt: "2025-02-17T14:00:00",
},
]
export const mockComments: Comment[] = [
{
id: "c1",
postId: "p1",
author: mockUsers[3],
content: "收到,下次继续组",
likeCount: 15,
liked: false,
createdAt: "2025-02-16T11:00:00",
},
{
id: "c2",
postId: "p1",
author: mockUsers[4],
content: "他枪法确实硬,不过脾气也直哈哈",
likeCount: 8,
liked: false,
createdAt: "2025-02-16T12:00:00",
},
{
id: "c3",
postId: "p2",
author: mockUsers[0],
content: "我照着打了两把,确实有用",
likeCount: 5,
liked: true,
createdAt: "2025-02-14T10:00:00",
},
]
export const mockNotifications: Notification[] = [
{
id: "n1",
type: "order",
title: "订单已接单",
content: "老李接单了,去聊天里约时间就行",
read: false,
link: "/order/ord1",
createdAt: "2025-02-18T14:35:00",
},
{
id: "n2",
type: "order",
title: "争议处理中",
content: "你提交的订单争议已进入审核",
read: true,
link: "/dispute/ord4",
createdAt: "2025-02-12T10:05:00",
},
{
id: "n3",
type: "community",
title: "帖子获得点赞",
content: "你的帖子「CS2上分体验分享」又多了42个赞",
read: false,
link: "/post/p1",
createdAt: "2025-02-17T20:00:00",
},
{
id: "n4",
type: "system",
title: "平台公告",
content: "春节活动 2 月 3 日上线,活动页明天开放。",
read: true,
createdAt: "2025-02-01T00:00:00",
},
{
id: "n5",
type: "community",
title: "新评论",
content: "阿辰评论了你的帖子",
read: false,
link: "/post/p1",
createdAt: "2025-02-16T11:00:00",
},
]
export const mockTransactions: WalletTransaction[] = [
{
id: "t1",
type: "topup",
amount: 500,
description: "充值",
createdAt: "2025-02-10T10:00:00",
},
{
id: "t2",
type: "payment",
amount: -116,
description: "支付订单 ord2",
createdAt: "2025-02-15T10:00:00",
},
{
id: "t3",
type: "payment",
amount: -99,
description: "支付订单 ord1",
createdAt: "2025-02-18T14:30:00",
},
{
id: "t4",
type: "topup",
amount: 200,
description: "充值",
createdAt: "2025-02-19T09:00:00",
},
{
id: "t5",
type: "payment",
amount: -69,
description: "支付订单 ord3",
createdAt: "2025-02-19T20:00:00",
},
{
id: "t6",
type: "payment",
amount: -87,
description: "支付订单 ord4",
createdAt: "2025-02-10T16:00:00",
},
{
id: "t7",
type: "payment",
amount: -54,
description: "支付订单 ord5",
createdAt: "2025-02-08T21:10:00",
},
{
id: "t8",
type: "payment",
amount: -38,
description: "支付订单 ord6",
createdAt: "2025-02-06T19:40:00",
},
{
id: "t9",
type: "payment",
amount: -57,
description: "支付订单 ord7",
createdAt: "2025-02-03T23:10:00",
},
]
export const currentUser = mockUsers[0]
export const walletBalance = 180
export const mockFavorites: Favorite[] = [
{
id: "fav1",
userId: "u1",
targetType: "player",
targetId: "u2",
createdAt: "2025-02-16T10:00:00",
},
{
id: "fav2",
userId: "u1",
targetType: "shop",
targetId: "shop1",
createdAt: "2025-02-17T14:00:00",
},
]