refactor(mock): remove lib/mock fixtures and empty stores
This commit is contained in:
@@ -1,256 +0,0 @@
|
||||
import type { ChatMessage, ChatSession } from "../types"
|
||||
|
||||
export const mockChatSessions: ChatSession[] = [
|
||||
{
|
||||
id: "9001",
|
||||
type: "order",
|
||||
orderId: "6010",
|
||||
participants: [
|
||||
{ id: "1002", name: "玲玲", avatar: "/avatars/u2.jpg" },
|
||||
{ id: "1007", name: "琪琪", avatar: "/avatars/u2.jpg" },
|
||||
],
|
||||
lastMessage: "好的那我先上号等你",
|
||||
lastMessageAt: "2025-02-06T19:15:00Z",
|
||||
unreadCount: 1,
|
||||
readonly: false,
|
||||
},
|
||||
{
|
||||
id: "9002",
|
||||
type: "order",
|
||||
orderId: "6011",
|
||||
participants: [
|
||||
{ id: "1003", name: "zz", avatar: "/avatars/u3.jpg" },
|
||||
{ id: "1009", name: "飞飞", avatar: "/avatars/u4.jpg" },
|
||||
],
|
||||
lastMessage: "走走走开一把",
|
||||
lastMessageAt: "2025-02-08T21:10:00Z",
|
||||
unreadCount: 0,
|
||||
readonly: false,
|
||||
},
|
||||
{
|
||||
id: "9003",
|
||||
type: "order",
|
||||
orderId: "6001",
|
||||
participants: [
|
||||
{ id: "1002", name: "玲玲", avatar: "/avatars/u2.jpg" },
|
||||
{ id: "1005", name: "俊俊", avatar: "/avatars/u5.jpg" },
|
||||
],
|
||||
lastMessage: "好的辛苦了",
|
||||
lastMessageAt: "2025-01-05T22:15:00Z",
|
||||
unreadCount: 0,
|
||||
readonly: true,
|
||||
},
|
||||
{
|
||||
id: "9004",
|
||||
type: "consultation",
|
||||
participants: [
|
||||
{ id: "1001", name: "小陈", avatar: "/avatars/u1.jpg" },
|
||||
{ id: "1007", name: "琪琪", avatar: "/avatars/u2.jpg" },
|
||||
],
|
||||
lastMessage: "周末能接单吗",
|
||||
lastMessageAt: "2025-02-09T15:00:00Z",
|
||||
unreadCount: 0,
|
||||
readonly: false,
|
||||
},
|
||||
{
|
||||
id: "9005",
|
||||
type: "order",
|
||||
orderId: "6002",
|
||||
participants: [
|
||||
{ id: "1001", name: "小陈", avatar: "/avatars/u1.jpg" },
|
||||
{ id: "1006", name: "Winter", avatar: "/avatars/u1.jpg" },
|
||||
],
|
||||
lastMessage: "下次再组",
|
||||
lastMessageAt: "2025-01-08T17:45:00Z",
|
||||
unreadCount: 0,
|
||||
readonly: true,
|
||||
},
|
||||
{
|
||||
id: "9006",
|
||||
type: "consultation",
|
||||
participants: [
|
||||
{ id: "1004", name: "莫莫", avatar: "/avatars/u4.jpg" },
|
||||
{ id: "1008", name: "暗影", avatar: "/avatars/u3.jpg" },
|
||||
],
|
||||
lastMessage: "你CS2什么段位",
|
||||
lastMessageAt: "2025-02-10T20:30:00Z",
|
||||
unreadCount: 2,
|
||||
readonly: false,
|
||||
},
|
||||
{
|
||||
id: "9007",
|
||||
type: "order",
|
||||
orderId: "6005",
|
||||
participants: [
|
||||
{ id: "1001", name: "小陈", avatar: "/avatars/u1.jpg" },
|
||||
{ id: "1009", name: "飞飞", avatar: "/avatars/u4.jpg" },
|
||||
],
|
||||
lastMessage: "打得不错 下次还找你",
|
||||
lastMessageAt: "2025-01-17T23:10:00Z",
|
||||
unreadCount: 0,
|
||||
readonly: true,
|
||||
},
|
||||
]
|
||||
|
||||
export const mockChatMessages: ChatMessage[] = [
|
||||
{
|
||||
id: "9101",
|
||||
sessionId: "9001",
|
||||
senderId: "0",
|
||||
senderName: "系统",
|
||||
senderAvatar: "",
|
||||
type: "system",
|
||||
content: "订单已创建,请协商游戏时间",
|
||||
createdAt: "2025-02-06T19:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9102",
|
||||
sessionId: "9001",
|
||||
senderId: "1007",
|
||||
senderName: "琪琪",
|
||||
senderAvatar: "/avatars/u2.jpg",
|
||||
type: "text",
|
||||
content: "在的,你现在能打吗",
|
||||
createdAt: "2025-02-06T19:02:00Z",
|
||||
},
|
||||
{
|
||||
id: "9103",
|
||||
sessionId: "9001",
|
||||
senderId: "1002",
|
||||
senderName: "玲玲",
|
||||
senderAvatar: "/avatars/u2.jpg",
|
||||
type: "text",
|
||||
content: "可以 我先上号",
|
||||
createdAt: "2025-02-06T19:05:00Z",
|
||||
},
|
||||
{
|
||||
id: "9104",
|
||||
sessionId: "9001",
|
||||
senderId: "1007",
|
||||
senderName: "琪琪",
|
||||
senderAvatar: "/avatars/u2.jpg",
|
||||
type: "text",
|
||||
content: "你ID多少 我加你",
|
||||
createdAt: "2025-02-06T19:08:00Z",
|
||||
},
|
||||
{
|
||||
id: "9105",
|
||||
sessionId: "9001",
|
||||
senderId: "1002",
|
||||
senderName: "玲玲",
|
||||
senderAvatar: "/avatars/u2.jpg",
|
||||
type: "text",
|
||||
content: "玲玲不会输,区服是微信区",
|
||||
createdAt: "2025-02-06T19:10:00Z",
|
||||
},
|
||||
{
|
||||
id: "9106",
|
||||
sessionId: "9001",
|
||||
senderId: "1007",
|
||||
senderName: "琪琪",
|
||||
senderAvatar: "/avatars/u2.jpg",
|
||||
type: "text",
|
||||
content: "好 加了 你通过一下",
|
||||
createdAt: "2025-02-06T19:12:00Z",
|
||||
},
|
||||
{
|
||||
id: "9107",
|
||||
sessionId: "9001",
|
||||
senderId: "1002",
|
||||
senderName: "玲玲",
|
||||
senderAvatar: "/avatars/u2.jpg",
|
||||
type: "text",
|
||||
content: "好的那我先上号等你",
|
||||
createdAt: "2025-02-06T19:15:00Z",
|
||||
},
|
||||
{
|
||||
id: "9108",
|
||||
sessionId: "9002",
|
||||
senderId: "0",
|
||||
senderName: "系统",
|
||||
senderAvatar: "",
|
||||
type: "system",
|
||||
content: "订单已创建",
|
||||
createdAt: "2025-02-08T21:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9109",
|
||||
sessionId: "9002",
|
||||
senderId: "1009",
|
||||
senderName: "飞飞",
|
||||
senderAvatar: "/avatars/u4.jpg",
|
||||
type: "text",
|
||||
content: "来了 你steam名字是啥",
|
||||
createdAt: "2025-02-08T21:06:00Z",
|
||||
},
|
||||
{
|
||||
id: "9110",
|
||||
sessionId: "9002",
|
||||
senderId: "1003",
|
||||
senderName: "zz",
|
||||
senderAvatar: "/avatars/u3.jpg",
|
||||
type: "text",
|
||||
content: "zz_noob 别笑",
|
||||
createdAt: "2025-02-08T21:07:00Z",
|
||||
},
|
||||
{
|
||||
id: "9111",
|
||||
sessionId: "9002",
|
||||
senderId: "1009",
|
||||
senderName: "飞飞",
|
||||
senderAvatar: "/avatars/u4.jpg",
|
||||
type: "text",
|
||||
content: "哈哈没事 加了",
|
||||
createdAt: "2025-02-08T21:08:00Z",
|
||||
},
|
||||
{
|
||||
id: "9112",
|
||||
sessionId: "9002",
|
||||
senderId: "1003",
|
||||
senderName: "zz",
|
||||
senderAvatar: "/avatars/u3.jpg",
|
||||
type: "text",
|
||||
content: "走走走开一把",
|
||||
createdAt: "2025-02-08T21:10:00Z",
|
||||
},
|
||||
{
|
||||
id: "9113",
|
||||
sessionId: "9004",
|
||||
senderId: "1001",
|
||||
senderName: "小陈",
|
||||
senderAvatar: "/avatars/u1.jpg",
|
||||
type: "text",
|
||||
content: "你好 想问下你周末能接王者的单吗",
|
||||
createdAt: "2025-02-09T14:55:00Z",
|
||||
},
|
||||
{
|
||||
id: "9114",
|
||||
sessionId: "9004",
|
||||
senderId: "1007",
|
||||
senderName: "琪琪",
|
||||
senderAvatar: "/avatars/u2.jpg",
|
||||
type: "text",
|
||||
content: "可以的 周末全天都在 你直接下单就行",
|
||||
createdAt: "2025-02-09T14:58:00Z",
|
||||
},
|
||||
{
|
||||
id: "9115",
|
||||
sessionId: "9004",
|
||||
senderId: "1001",
|
||||
senderName: "小陈",
|
||||
senderAvatar: "/avatars/u1.jpg",
|
||||
type: "text",
|
||||
content: "周末能接单吗",
|
||||
createdAt: "2025-02-09T15:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9116",
|
||||
sessionId: "9006",
|
||||
senderId: "1004",
|
||||
senderName: "莫莫",
|
||||
senderAvatar: "/avatars/u4.jpg",
|
||||
type: "text",
|
||||
content: "你CS2什么段位",
|
||||
createdAt: "2025-02-10T20:30:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,158 +0,0 @@
|
||||
import type { Comment } from "../types"
|
||||
import { mockUsers } from "./users"
|
||||
|
||||
export const mockComments: Comment[] = [
|
||||
{
|
||||
id: "9601",
|
||||
postId: "9501",
|
||||
author: mockUsers[4],
|
||||
content: "谢谢老板 下次还可以组",
|
||||
likeCount: 12,
|
||||
liked: false,
|
||||
createdAt: "2025-01-02T11:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9602",
|
||||
postId: "9501",
|
||||
author: mockUsers[2],
|
||||
content: "这个活动力度可以 我去看看",
|
||||
likeCount: 5,
|
||||
liked: false,
|
||||
createdAt: "2025-01-02T12:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9603",
|
||||
postId: "9502",
|
||||
author: mockUsers[4],
|
||||
content: "收到好评 下次继续",
|
||||
likeCount: 8,
|
||||
liked: false,
|
||||
createdAt: "2025-01-06T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9604",
|
||||
postId: "9502",
|
||||
author: mockUsers[3],
|
||||
content: "俊俊确实稳 我也找过他",
|
||||
likeCount: 6,
|
||||
liked: true,
|
||||
createdAt: "2025-01-06T11:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9605",
|
||||
postId: "9503",
|
||||
author: mockUsers[0],
|
||||
content: "第三点说得对 之前就是自己乱搞输的",
|
||||
likeCount: 15,
|
||||
liked: false,
|
||||
createdAt: "2025-01-11T08:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9606",
|
||||
postId: "9503",
|
||||
author: mockUsers[1],
|
||||
content: "学到了 下次试试",
|
||||
likeCount: 3,
|
||||
liked: false,
|
||||
createdAt: "2025-01-11T09:20:00Z",
|
||||
},
|
||||
{
|
||||
id: "9607",
|
||||
postId: "9503",
|
||||
author: mockUsers[5],
|
||||
content: "补充一下 打野来gank的时候别退 跟着打就行",
|
||||
likeCount: 22,
|
||||
liked: true,
|
||||
createdAt: "2025-01-11T10:45:00Z",
|
||||
},
|
||||
{
|
||||
id: "9608",
|
||||
postId: "9504",
|
||||
author: mockUsers[6],
|
||||
content: "确实有些人态度不行 但大部分还是靠谱的",
|
||||
likeCount: 18,
|
||||
liked: false,
|
||||
createdAt: "2025-01-14T00:10:00Z",
|
||||
},
|
||||
{
|
||||
id: "9609",
|
||||
postId: "9504",
|
||||
author: mockUsers[9],
|
||||
content: "我们店里不会这样 有问题随时找我",
|
||||
likeCount: 7,
|
||||
liked: false,
|
||||
createdAt: "2025-01-14T08:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9610",
|
||||
postId: "9505",
|
||||
author: mockUsers[0],
|
||||
content: "Winter确实不催人 这点很舒服",
|
||||
likeCount: 4,
|
||||
liked: false,
|
||||
createdAt: "2025-01-09T19:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9611",
|
||||
postId: "9506",
|
||||
author: mockUsers[3],
|
||||
content: "决赛圈那段说得好 我每次都死在跑圈",
|
||||
likeCount: 11,
|
||||
liked: false,
|
||||
createdAt: "2025-01-18T16:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9612",
|
||||
postId: "9506",
|
||||
author: mockUsers[0],
|
||||
content: "稳健打法确实适合新手 我试了几把有效果",
|
||||
likeCount: 8,
|
||||
liked: true,
|
||||
createdAt: "2025-01-19T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9613",
|
||||
postId: "9507",
|
||||
author: mockUsers[6],
|
||||
content: "谢谢认可!下次还可以组",
|
||||
likeCount: 14,
|
||||
liked: false,
|
||||
createdAt: "2025-01-15T22:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9614",
|
||||
postId: "9507",
|
||||
author: mockUsers[1],
|
||||
content: "女打手这么猛的吗 我也想试试",
|
||||
likeCount: 9,
|
||||
liked: false,
|
||||
createdAt: "2025-01-16T08:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9615",
|
||||
postId: "9508",
|
||||
author: mockUsers[8],
|
||||
content: "我可以 私聊了",
|
||||
likeCount: 2,
|
||||
liked: false,
|
||||
createdAt: "2025-01-22T12:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9616",
|
||||
postId: "9509",
|
||||
author: mockUsers[8],
|
||||
content: "谢谢老板好评 准时上线是基本的",
|
||||
likeCount: 6,
|
||||
liked: false,
|
||||
createdAt: "2025-01-19T00:10:00Z",
|
||||
},
|
||||
{
|
||||
id: "9617",
|
||||
postId: "9510",
|
||||
author: mockUsers[7],
|
||||
content: "谢谢推荐",
|
||||
likeCount: 3,
|
||||
liked: false,
|
||||
createdAt: "2025-01-14T11:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,25 +0,0 @@
|
||||
import type { Dispute } from "../types"
|
||||
|
||||
export const mockDisputes: Dispute[] = [
|
||||
{
|
||||
id: "8001",
|
||||
orderId: "6014",
|
||||
initiatorId: "1003",
|
||||
initiatorName: "zz",
|
||||
reason: "打了两局DOTA,第二局中途说有事直接退了,等了半小时没回来。约好的两局只打了一局半。",
|
||||
evidence: ["/evidence/d1-1.jpg", "/evidence/d1-2.jpg"],
|
||||
status: "reviewing",
|
||||
createdAt: "2025-02-15T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "8002",
|
||||
orderId: "6010",
|
||||
initiatorId: "1007",
|
||||
initiatorName: "琪琪",
|
||||
reason: "对方下单后一直不上线,约了三次时间都放鸽子,已经拖了两天了。",
|
||||
evidence: ["/evidence/d2-1.jpg"],
|
||||
status: "resolved",
|
||||
result: "partial_refund",
|
||||
createdAt: "2025-02-08T12:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,74 +0,0 @@
|
||||
import type { Favorite } from "../types"
|
||||
|
||||
export const mockFavorites: Favorite[] = [
|
||||
{
|
||||
id: "9201",
|
||||
userId: "1001",
|
||||
targetType: "player",
|
||||
targetId: "1005",
|
||||
createdAt: "2025-01-06T10:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9202",
|
||||
userId: "1001",
|
||||
targetType: "shop",
|
||||
targetId: "3001",
|
||||
createdAt: "2025-01-10T14:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9203",
|
||||
userId: "1001",
|
||||
targetType: "player",
|
||||
targetId: "1007",
|
||||
createdAt: "2025-01-16T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9204",
|
||||
userId: "1002",
|
||||
targetType: "player",
|
||||
targetId: "1006",
|
||||
createdAt: "2025-01-09T18:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9205",
|
||||
userId: "1002",
|
||||
targetType: "shop",
|
||||
targetId: "3002",
|
||||
createdAt: "2025-01-12T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9206",
|
||||
userId: "1003",
|
||||
targetType: "player",
|
||||
targetId: "1008",
|
||||
createdAt: "2025-01-12T01:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9207",
|
||||
userId: "1004",
|
||||
targetType: "player",
|
||||
targetId: "1007",
|
||||
createdAt: "2025-01-15T22:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9208",
|
||||
userId: "1004",
|
||||
targetType: "shop",
|
||||
targetId: "3001",
|
||||
createdAt: "2025-01-20T11:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9209",
|
||||
userId: "1001",
|
||||
targetType: "player",
|
||||
targetId: "1009",
|
||||
createdAt: "2025-01-18T23:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9210",
|
||||
userId: "1003",
|
||||
targetType: "shop",
|
||||
targetId: "3003",
|
||||
createdAt: "2025-02-09T15:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,16 +0,0 @@
|
||||
import type { Game } from "../types"
|
||||
|
||||
export const mockGames: Game[] = [
|
||||
{ id: "2001", name: "英雄联盟", icon: "Swords", category: "MOBA" },
|
||||
{ id: "2002", name: "王者荣耀", icon: "Crown", category: "MOBA" },
|
||||
{ id: "2003", name: "CS2", icon: "Crosshair", category: "FPS" },
|
||||
{ id: "2004", name: "永劫无间", icon: "Sword", category: "动作" },
|
||||
{ id: "2005", name: "原神", icon: "Sparkles", category: "RPG" },
|
||||
{ id: "2006", name: "和平精英", icon: "Target", category: "FPS" },
|
||||
{ id: "2007", name: "DOTA2", icon: "Shield", category: "MOBA" },
|
||||
{ id: "2008", name: "无畏契约", icon: "Zap", category: "FPS" },
|
||||
{ id: "2009", name: "绝区零", icon: "Flame", category: "动作" },
|
||||
{ id: "2010", name: "崩坏:星穹铁道", icon: "Star", category: "RPG" },
|
||||
{ id: "2011", name: "第五人格", icon: "Ghost", category: "动作" },
|
||||
{ id: "2012", name: "三角洲行动", icon: "Radar", category: "FPS" },
|
||||
]
|
||||
@@ -1,14 +0,0 @@
|
||||
export { mockChatMessages, mockChatSessions } from "./chat"
|
||||
export { mockComments } from "./comments"
|
||||
export { mockDisputes } from "./disputes"
|
||||
export { mockFavorites } from "./favorites"
|
||||
export { mockGames } from "./games"
|
||||
export { mockNotifications } from "./notifications"
|
||||
export { mockOrders } from "./orders"
|
||||
export { mockPlayers } from "./players"
|
||||
export { mockPosts } from "./posts"
|
||||
export { mockReviews } from "./reviews"
|
||||
export { mockServices } from "./services"
|
||||
export { mockShops } from "./shops"
|
||||
export { mockTransactions, walletBalance } from "./transactions"
|
||||
export { currentUser, mockUsers } from "./users"
|
||||
@@ -1,109 +0,0 @@
|
||||
import type { Notification } from "../types"
|
||||
|
||||
export const mockNotifications: Notification[] = [
|
||||
{
|
||||
id: "9301",
|
||||
type: "order",
|
||||
title: "订单已接单",
|
||||
content: "琪琪接了你的王者荣耀订单,去聊天约时间吧",
|
||||
read: false,
|
||||
link: "/order/6010",
|
||||
createdAt: "2025-02-06T19:08:00Z",
|
||||
},
|
||||
{
|
||||
id: "9302",
|
||||
type: "order",
|
||||
title: "订单已完成",
|
||||
content: "你和俊俊的LOL订单已完成,快去评价吧",
|
||||
read: false,
|
||||
link: "/order/6001",
|
||||
createdAt: "2025-01-05T22:25:00Z",
|
||||
},
|
||||
{
|
||||
id: "9303",
|
||||
type: "order",
|
||||
title: "争议处理中",
|
||||
content: "你提交的订单争议已进入审核,请耐心等待",
|
||||
read: true,
|
||||
link: "/dispute/6014",
|
||||
createdAt: "2025-02-15T10:05:00Z",
|
||||
},
|
||||
{
|
||||
id: "9304",
|
||||
type: "community",
|
||||
title: "帖子获得点赞",
|
||||
content: "你的帖子「找了个LOL陪玩 三把全赢了」又多了87个赞",
|
||||
read: false,
|
||||
link: "/post/9501",
|
||||
createdAt: "2025-01-08T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9305",
|
||||
type: "community",
|
||||
title: "新评论",
|
||||
content: "俊俊评论了你的帖子",
|
||||
read: false,
|
||||
link: "/post/9502",
|
||||
createdAt: "2025-01-06T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9306",
|
||||
type: "system",
|
||||
title: "平台公告",
|
||||
content: "春节活动上线,2月1日至2月15日全场服务享9折优惠",
|
||||
read: true,
|
||||
createdAt: "2025-01-28T00:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9307",
|
||||
type: "order",
|
||||
title: "新订单待接单",
|
||||
content: "莫莫下了一个原神深渊代打的单,快去看看",
|
||||
read: false,
|
||||
link: "/order/6012",
|
||||
createdAt: "2025-02-10T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9308",
|
||||
type: "community",
|
||||
title: "帖子被引用",
|
||||
content: "zz引用了你的帖子「吐槽一下,有些打手真的不行」",
|
||||
read: true,
|
||||
link: "/post/9510",
|
||||
createdAt: "2025-01-14T10:05:00Z",
|
||||
},
|
||||
{
|
||||
id: "9309",
|
||||
type: "system",
|
||||
title: "认证通过",
|
||||
content: "你的打手认证已通过,现在可以发布服务了",
|
||||
read: true,
|
||||
createdAt: "2024-12-20T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9310",
|
||||
type: "order",
|
||||
title: "订单已取消",
|
||||
content: "玲玲取消了CS2车队位的订单",
|
||||
read: true,
|
||||
link: "/order/6015",
|
||||
createdAt: "2025-02-16T18:05:00Z",
|
||||
},
|
||||
{
|
||||
id: "9311",
|
||||
type: "community",
|
||||
title: "新评论",
|
||||
content: "Winter评论了你的帖子「LOL双排接单攻略」",
|
||||
read: false,
|
||||
link: "/post/9503",
|
||||
createdAt: "2025-01-11T10:45:00Z",
|
||||
},
|
||||
{
|
||||
id: "9312",
|
||||
type: "system",
|
||||
title: "系统维护通知",
|
||||
content: "2月20日凌晨2:00-4:00进行系统维护,届时无法下单",
|
||||
read: false,
|
||||
createdAt: "2025-02-18T12:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,235 +0,0 @@
|
||||
import type { Order } from "../types"
|
||||
import { mockServices } from "./services"
|
||||
|
||||
export const mockOrders: Order[] = [
|
||||
{
|
||||
id: "6001",
|
||||
consumerId: "1002",
|
||||
consumerName: "玲玲",
|
||||
playerId: "1005",
|
||||
playerName: "俊俊",
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
service: mockServices[0],
|
||||
status: "completed",
|
||||
totalPrice: 75,
|
||||
note: "麻烦打3局,我今天状态不好一直输",
|
||||
createdAt: "2025-01-05T19:30:00Z",
|
||||
acceptedAt: "2025-01-05T19:45:00Z",
|
||||
closedAt: "2025-01-05T22:10:00Z",
|
||||
completedAt: "2025-01-05T22:25:00Z",
|
||||
},
|
||||
{
|
||||
id: "6002",
|
||||
consumerId: "1001",
|
||||
consumerName: "小陈",
|
||||
playerId: "1006",
|
||||
playerName: "Winter",
|
||||
shopId: "3002",
|
||||
shopName: "Yuki 小屋",
|
||||
service: mockServices[3],
|
||||
status: "completed",
|
||||
totalPrice: 54,
|
||||
note: "3星,我用鲁班",
|
||||
createdAt: "2025-01-08T15:00:00Z",
|
||||
acceptedAt: "2025-01-08T15:12:00Z",
|
||||
closedAt: "2025-01-08T17:40:00Z",
|
||||
completedAt: "2025-01-08T17:55:00Z",
|
||||
},
|
||||
{
|
||||
id: "6003",
|
||||
consumerId: "1003",
|
||||
consumerName: "zz",
|
||||
playerId: "1008",
|
||||
playerName: "暗影",
|
||||
service: mockServices[9],
|
||||
status: "completed",
|
||||
totalPrice: 90,
|
||||
createdAt: "2025-01-11T22:00:00Z",
|
||||
acceptedAt: "2025-01-11T22:05:00Z",
|
||||
closedAt: "2025-01-12T00:30:00Z",
|
||||
completedAt: "2025-01-12T00:45:00Z",
|
||||
},
|
||||
{
|
||||
id: "6004",
|
||||
consumerId: "1004",
|
||||
consumerName: "莫莫",
|
||||
playerId: "1007",
|
||||
playerName: "琪琪",
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
service: mockServices[7],
|
||||
status: "completed",
|
||||
totalPrice: 44,
|
||||
note: "2局就行,主要想练练枪法",
|
||||
createdAt: "2025-01-14T20:00:00Z",
|
||||
acceptedAt: "2025-01-14T20:08:00Z",
|
||||
closedAt: "2025-01-14T21:50:00Z",
|
||||
completedAt: "2025-01-14T22:05:00Z",
|
||||
},
|
||||
{
|
||||
id: "6005",
|
||||
consumerId: "1001",
|
||||
consumerName: "小陈",
|
||||
playerId: "1009",
|
||||
playerName: "飞飞",
|
||||
shopId: "3003",
|
||||
shopName: "浩哥开黑",
|
||||
service: mockServices[12],
|
||||
status: "completed",
|
||||
totalPrice: 60,
|
||||
note: "3局,打辅助配合我就行",
|
||||
createdAt: "2025-01-17T20:30:00Z",
|
||||
acceptedAt: "2025-01-17T20:35:00Z",
|
||||
closedAt: "2025-01-17T23:00:00Z",
|
||||
completedAt: "2025-01-17T23:15:00Z",
|
||||
},
|
||||
{
|
||||
id: "6006",
|
||||
consumerId: "1003",
|
||||
consumerName: "zz",
|
||||
playerId: "1006",
|
||||
playerName: "Winter",
|
||||
shopId: "3002",
|
||||
shopName: "Yuki 小屋",
|
||||
service: mockServices[5],
|
||||
status: "completed",
|
||||
totalPrice: 40,
|
||||
note: "2局,我是新手别嫌弃",
|
||||
createdAt: "2025-01-20T21:00:00Z",
|
||||
acceptedAt: "2025-01-20T21:10:00Z",
|
||||
closedAt: "2025-01-20T23:20:00Z",
|
||||
completedAt: "2025-01-20T23:35:00Z",
|
||||
},
|
||||
{
|
||||
id: "6007",
|
||||
consumerId: "1002",
|
||||
consumerName: "玲玲",
|
||||
playerId: "1009",
|
||||
playerName: "飞飞",
|
||||
shopId: "3003",
|
||||
shopName: "浩哥开黑",
|
||||
service: mockServices[13],
|
||||
status: "completed",
|
||||
totalPrice: 30,
|
||||
createdAt: "2025-01-23T10:00:00Z",
|
||||
acceptedAt: "2025-01-23T10:15:00Z",
|
||||
closedAt: "2025-01-23T11:00:00Z",
|
||||
completedAt: "2025-01-23T11:20:00Z",
|
||||
},
|
||||
{
|
||||
id: "6008",
|
||||
consumerId: "1004",
|
||||
consumerName: "莫莫",
|
||||
playerId: "1005",
|
||||
playerName: "俊俊",
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
service: mockServices[1],
|
||||
status: "pending_review",
|
||||
totalPrice: 40,
|
||||
note: "2局,随便打打",
|
||||
createdAt: "2025-02-01T20:00:00Z",
|
||||
acceptedAt: "2025-02-01T20:10:00Z",
|
||||
closedAt: "2025-02-01T22:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "6009",
|
||||
consumerId: "1001",
|
||||
consumerName: "小陈",
|
||||
playerId: "1008",
|
||||
playerName: "暗影",
|
||||
service: mockServices[11],
|
||||
status: "pending_review",
|
||||
totalPrice: 120,
|
||||
createdAt: "2025-02-03T22:30:00Z",
|
||||
acceptedAt: "2025-02-03T22:35:00Z",
|
||||
closedAt: "2025-02-04T01:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "6010",
|
||||
consumerId: "1002",
|
||||
consumerName: "玲玲",
|
||||
playerId: "1007",
|
||||
playerName: "琪琪",
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
service: mockServices[6],
|
||||
status: "in_progress",
|
||||
totalPrice: 84,
|
||||
note: "3星,我段位铂金2",
|
||||
createdAt: "2025-02-06T19:00:00Z",
|
||||
acceptedAt: "2025-02-06T19:08:00Z",
|
||||
},
|
||||
{
|
||||
id: "6011",
|
||||
consumerId: "1003",
|
||||
consumerName: "zz",
|
||||
playerId: "1009",
|
||||
playerName: "飞飞",
|
||||
shopId: "3003",
|
||||
shopName: "浩哥开黑",
|
||||
service: mockServices[14],
|
||||
status: "in_progress",
|
||||
totalPrice: 50,
|
||||
createdAt: "2025-02-08T21:00:00Z",
|
||||
acceptedAt: "2025-02-08T21:05:00Z",
|
||||
},
|
||||
{
|
||||
id: "6012",
|
||||
consumerId: "1004",
|
||||
consumerName: "莫莫",
|
||||
playerId: "1006",
|
||||
playerName: "Winter",
|
||||
shopId: "3002",
|
||||
shopName: "Yuki 小屋",
|
||||
service: mockServices[4],
|
||||
status: "pending_accept",
|
||||
totalPrice: 30,
|
||||
note: "2局轻松局,不用太认真",
|
||||
createdAt: "2025-02-10T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "6013",
|
||||
consumerId: "1001",
|
||||
consumerName: "小陈",
|
||||
playerId: "1007",
|
||||
playerName: "琪琪",
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
service: mockServices[8],
|
||||
status: "pending_close",
|
||||
totalPrice: 18,
|
||||
createdAt: "2025-02-12T14:00:00Z",
|
||||
acceptedAt: "2025-02-12T14:10:00Z",
|
||||
closedAt: "2025-02-12T15:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "6014",
|
||||
consumerId: "1003",
|
||||
consumerName: "zz",
|
||||
playerId: "1008",
|
||||
playerName: "暗影",
|
||||
service: mockServices[10],
|
||||
status: "disputed",
|
||||
totalPrice: 60,
|
||||
note: "2局DOTA,我是herald别介意",
|
||||
createdAt: "2025-02-14T21:00:00Z",
|
||||
acceptedAt: "2025-02-14T21:08:00Z",
|
||||
closedAt: "2025-02-14T23:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "6015",
|
||||
consumerId: "1002",
|
||||
consumerName: "玲玲",
|
||||
playerId: "1005",
|
||||
playerName: "俊俊",
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
service: mockServices[2],
|
||||
status: "cancelled",
|
||||
totalPrice: 44,
|
||||
note: "临时有事取消了,下次再约",
|
||||
createdAt: "2025-02-16T18:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,69 +0,0 @@
|
||||
import type { Player } from "../types"
|
||||
import { mockServices } from "./services"
|
||||
import { mockUsers } from "./users"
|
||||
|
||||
export const mockPlayers: Player[] = [
|
||||
{
|
||||
id: "1005",
|
||||
user: mockUsers[4],
|
||||
rating: 4.2,
|
||||
totalOrders: 156,
|
||||
completionRate: 0.94,
|
||||
status: "available",
|
||||
games: ["英雄联盟", "王者荣耀"],
|
||||
services: mockServices.filter((s) => s.playerId === "1005"),
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
tags: ["闷声干活", "不催不急", "准时上线"],
|
||||
},
|
||||
{
|
||||
id: "1006",
|
||||
user: mockUsers[5],
|
||||
rating: 4.7,
|
||||
totalOrders: 412,
|
||||
completionRate: 0.97,
|
||||
status: "available",
|
||||
games: ["英雄联盟", "DOTA2", "原神", "第五人格"],
|
||||
services: mockServices.filter((s) => s.playerId === "1006"),
|
||||
shopId: "3002",
|
||||
shopName: "Yuki 小屋",
|
||||
tags: ["态度好", "会讲思路", "老手"],
|
||||
},
|
||||
{
|
||||
id: "1007",
|
||||
user: mockUsers[6],
|
||||
rating: 4.5,
|
||||
totalOrders: 289,
|
||||
completionRate: 0.95,
|
||||
status: "busy",
|
||||
games: ["王者荣耀", "和平精英", "绝区零"],
|
||||
services: mockServices.filter((s) => s.playerId === "1007"),
|
||||
shopId: "3001",
|
||||
shopName: "老王游戏工作室",
|
||||
tags: ["女打手", "技术硬", "不闲聊"],
|
||||
},
|
||||
{
|
||||
id: "1008",
|
||||
user: mockUsers[7],
|
||||
rating: 4.8,
|
||||
totalOrders: 97,
|
||||
completionRate: 0.91,
|
||||
status: "available",
|
||||
games: ["无畏契约", "DOTA2", "CS2"],
|
||||
services: mockServices.filter((s) => s.playerId === "1008"),
|
||||
tags: ["效率高", "话少", "枪法硬"],
|
||||
},
|
||||
{
|
||||
id: "1009",
|
||||
user: mockUsers[8],
|
||||
rating: 4.4,
|
||||
totalOrders: 203,
|
||||
completionRate: 0.98,
|
||||
status: "offline",
|
||||
games: ["英雄联盟", "崩坏:星穹铁道", "三角洲行动"],
|
||||
services: mockServices.filter((s) => s.playerId === "1009"),
|
||||
shopId: "3003",
|
||||
shopName: "浩哥开黑",
|
||||
tags: ["不掉线", "守时", "长期接单"],
|
||||
},
|
||||
]
|
||||
@@ -1,160 +0,0 @@
|
||||
import type { Post } from "../types"
|
||||
import { mockUsers } from "./users"
|
||||
|
||||
export const mockPosts: Post[] = [
|
||||
{
|
||||
id: "9501",
|
||||
author: mockUsers[10],
|
||||
authorRole: "owner",
|
||||
title: "Yuki小屋新年活动!1月全场8折,限时7天",
|
||||
content:
|
||||
"新年快乐各位!1月份搞个小活动,全部服务打八折,包括LOL、第五人格、王者都有。时间就到1月15号,有需要的赶紧来,名额有限哈。Winter和我都在,随时接单。",
|
||||
images: ["/posts/p1-1.jpg"],
|
||||
tags: ["Yuki小屋", "活动", "英雄联盟", "第五人格", "王者荣耀"],
|
||||
likeCount: 87,
|
||||
commentCount: 14,
|
||||
liked: false,
|
||||
pinned: true,
|
||||
createdAt: "2025-01-02T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9502",
|
||||
author: mockUsers[1],
|
||||
authorRole: "consumer",
|
||||
title: "跟俊俊打了三局LOL,赢了两把!",
|
||||
content:
|
||||
"之前一直输一直输,今天下单试了一下,俊俊打野,我打中单,配合还挺顺的。第一局有点磨合,后面两局就好多了。话不多但是打得认真,该抓的时候就来,不会乱。下次还找他。",
|
||||
images: ["/posts/p2-1.jpg", "/posts/p2-2.jpg"],
|
||||
tags: ["英雄联盟", "LOL", "秀单"],
|
||||
linkedOrderId: "6001",
|
||||
likeCount: 43,
|
||||
commentCount: 8,
|
||||
liked: true,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-06T09:15:00Z",
|
||||
},
|
||||
{
|
||||
id: "9503",
|
||||
author: mockUsers[4],
|
||||
authorRole: "player",
|
||||
title: "LOL双排接单攻略——怎么配合你的打手赢更多",
|
||||
content:
|
||||
"接了这么多单,发现很多人不知道怎么配合打手,导致明明打手发挥不错但还是输了。说几个常见问题:\n\n1. 打手在打野的时候别乱走,跟着走就行\n2. 团战不要先手,等打手起手再跟\n3. 有什么想法直接说,别憋着,我们可以调整\n\n其实很简单,信任就行,别自己乱搞。",
|
||||
images: [],
|
||||
tags: ["英雄联盟", "LOL", "攻略", "双排技巧"],
|
||||
likeCount: 126,
|
||||
commentCount: 19,
|
||||
liked: false,
|
||||
pinned: true,
|
||||
createdAt: "2025-01-10T20:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9504",
|
||||
author: mockUsers[2],
|
||||
authorRole: "consumer",
|
||||
title: "吐槽一下,有些打手真的不行",
|
||||
content:
|
||||
"不点名,就说一下体验。下了个单,打手全程不说话,问他要不要换个打法也不回,最后输了还说是我的问题。我知道我菜,但你接单就得有个服务态度吧?钱也不少收。\n\n后来换了家,好多了,所以还是要多看评价再下单。",
|
||||
images: [],
|
||||
tags: ["吐槽", "陪玩体验"],
|
||||
likeCount: 58,
|
||||
commentCount: 11,
|
||||
liked: false,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-13T22:45:00Z",
|
||||
},
|
||||
{
|
||||
id: "9505",
|
||||
author: mockUsers[0],
|
||||
authorRole: "consumer",
|
||||
title: "和Winter打王者,体验还不错",
|
||||
content:
|
||||
"我用鲁班,他配合我,打了三局赢了两局。主要是他不催,我手速慢他也没说什么,就正常打。上了两颗星,今天满足了。",
|
||||
images: ["/posts/p5-1.jpg"],
|
||||
tags: ["王者荣耀", "秀单", "Yuki小屋"],
|
||||
linkedOrderId: "6002",
|
||||
likeCount: 31,
|
||||
commentCount: 5,
|
||||
liked: false,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-09T18:20:00Z",
|
||||
},
|
||||
{
|
||||
id: "9506",
|
||||
author: mockUsers[6],
|
||||
authorRole: "player",
|
||||
title: "和平精英吃鸡小技巧,稳健打法分享",
|
||||
content:
|
||||
"很多人喜欢一上来就冲,其实稳健打法胜率更高。我的习惯是:\n\n- 落点选边缘区,物资够用就行,别贪\n- 中期跟圈走,不主动找人\n- 决赛圈再打,这时候人少了,优势更大\n\n当然这不是唯一打法,但对新手来说最容易上手。有问题可以问我。",
|
||||
images: ["/posts/p6-1.jpg", "/posts/p6-2.jpg"],
|
||||
tags: ["和平精英", "吃鸡", "攻略"],
|
||||
likeCount: 94,
|
||||
commentCount: 16,
|
||||
liked: true,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-18T15:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9507",
|
||||
author: mockUsers[3],
|
||||
authorRole: "consumer",
|
||||
title: "琪琪带我打和平,枪法真的稳",
|
||||
content:
|
||||
"之前一直觉得女生打手可能没那么厉害,结果被打脸了。琪琪枪法比我认识的大多数男生都稳,决赛圈那把压枪压得我看呆了。两局都进了前三,第二局吃鸡。下次还找她。",
|
||||
images: ["/posts/p7-1.jpg"],
|
||||
tags: ["和平精英", "秀单", "老王游戏工作室"],
|
||||
linkedOrderId: "6004",
|
||||
likeCount: 67,
|
||||
commentCount: 9,
|
||||
liked: true,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-15T21:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9508",
|
||||
author: mockUsers[9],
|
||||
authorRole: "owner",
|
||||
title: "老王工作室招新打手,有意向的来聊",
|
||||
content:
|
||||
"工作室目前在招LOL、王者、和平精英方向的打手。要求不高,段位够用就行,主要看服务态度和稳定性。接单量大,不愁没单。有意向的私信我,说一下你玩什么游戏、段位、每天能上几个小时。",
|
||||
images: [],
|
||||
tags: ["老王游戏工作室", "招募", "打手招募"],
|
||||
likeCount: 52,
|
||||
commentCount: 7,
|
||||
liked: false,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-22T11:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9509",
|
||||
author: mockUsers[1],
|
||||
authorRole: "consumer",
|
||||
title: "飞飞LOL辅助真的很懂配合",
|
||||
content:
|
||||
"我打ADC,飞飞打辅助,三局全赢。他会看我的走位然后跟着保护,不会乱抢资源,视野也插得很好。感觉比我之前随机到的辅助强多了。而且说好几点上就几点上,没让我等。",
|
||||
images: ["/posts/p9-1.jpg", "/posts/p9-2.jpg"],
|
||||
tags: ["英雄联盟", "LOL", "秀单", "浩哥开黑"],
|
||||
linkedOrderId: "6005",
|
||||
likeCount: 49,
|
||||
commentCount: 6,
|
||||
liked: false,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-18T23:45:00Z",
|
||||
},
|
||||
{
|
||||
id: "9510",
|
||||
author: mockUsers[2],
|
||||
authorRole: "consumer",
|
||||
title: "回复p4,找打手真的要看评价",
|
||||
content:
|
||||
"看到之前那个吐槽帖,深有同感。我也踩过坑,后来学乖了,下单前一定先看评价,特别是最近一个月的。评价少的或者有差评的直接跳过,不值得赌。\n\n现在找到几个靠谱的了,暗影的无畏契约打得很好,推荐。",
|
||||
images: [],
|
||||
tags: ["陪玩体验", "避坑"],
|
||||
quotedPostId: "9504",
|
||||
likeCount: 38,
|
||||
commentCount: 4,
|
||||
liked: false,
|
||||
pinned: false,
|
||||
createdAt: "2025-01-14T10:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,217 +0,0 @@
|
||||
import type { Review } from "../types"
|
||||
|
||||
export const mockReviews: Review[] = [
|
||||
{
|
||||
id: "7001",
|
||||
orderId: "6001",
|
||||
fromUserId: "1001",
|
||||
fromUserName: "小陈",
|
||||
fromUserAvatar: "/avatars/u1.jpg",
|
||||
toUserId: "1005",
|
||||
rating: 5,
|
||||
content: "打得很好,带我上了好几局,沟通也顺畅,下次还找",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-10T20:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "7002",
|
||||
orderId: "6001",
|
||||
fromUserId: "1005",
|
||||
fromUserName: "俊俊",
|
||||
fromUserAvatar: "/avatars/u4.jpg",
|
||||
toUserId: "1001",
|
||||
rating: 5,
|
||||
content: "配合很好,没有乱跑,愉快",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-10T21:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "7003",
|
||||
orderId: "6002",
|
||||
fromUserId: "1002",
|
||||
fromUserName: "玲玲",
|
||||
fromUserAvatar: "/avatars/u2.jpg",
|
||||
toUserId: "1006",
|
||||
rating: 4,
|
||||
content: "整体还不错,就是中间断线了一次,不过后来补回来了",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-12T19:15:00Z",
|
||||
},
|
||||
{
|
||||
id: "7004",
|
||||
orderId: "6002",
|
||||
fromUserId: "1006",
|
||||
fromUserName: "Winter",
|
||||
fromUserAvatar: "/avatars/u1.jpg",
|
||||
toUserId: "1002",
|
||||
rating: 4,
|
||||
sealed: false,
|
||||
createdAt: "2025-01-12T19:45:00Z",
|
||||
},
|
||||
{
|
||||
id: "7005",
|
||||
orderId: "6003",
|
||||
fromUserId: "1003",
|
||||
fromUserName: "zz",
|
||||
fromUserAvatar: "/avatars/u3.jpg",
|
||||
toUserId: "1007",
|
||||
rating: 5,
|
||||
content: "琪琪真的很厉害!教了我好多操作,感觉进步了不少",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-14T22:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "7006",
|
||||
orderId: "6003",
|
||||
fromUserId: "1007",
|
||||
fromUserName: "琪琪",
|
||||
fromUserAvatar: "/avatars/u2.jpg",
|
||||
toUserId: "1003",
|
||||
rating: 5,
|
||||
content: "学得很认真,问题也问得很到位,喜欢这种用户",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-14T22:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "7007",
|
||||
orderId: "6004",
|
||||
fromUserId: "1004",
|
||||
fromUserName: "莫莫",
|
||||
fromUserAvatar: "/avatars/u4.jpg",
|
||||
toUserId: "1008",
|
||||
rating: 3,
|
||||
content: "发挥一般,感觉状态不太好,赢了两局输了三局",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-16T18:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "7008",
|
||||
orderId: "6004",
|
||||
fromUserId: "1008",
|
||||
fromUserName: "暗影",
|
||||
fromUserAvatar: "/avatars/u3.jpg",
|
||||
toUserId: "1004",
|
||||
rating: 4,
|
||||
content: "还行,没有乱催,比较好说话",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-16T18:20:00Z",
|
||||
},
|
||||
{
|
||||
id: "7009",
|
||||
orderId: "6005",
|
||||
fromUserId: "1001",
|
||||
fromUserName: "小陈",
|
||||
fromUserAvatar: "/avatars/u1.jpg",
|
||||
toUserId: "1009",
|
||||
rating: 5,
|
||||
content: "飞飞太强了,全程碾压,爽!",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-18T21:10:00Z",
|
||||
},
|
||||
{
|
||||
id: "7010",
|
||||
orderId: "6005",
|
||||
fromUserId: "1009",
|
||||
fromUserName: "飞飞",
|
||||
fromUserAvatar: "/avatars/u4.jpg",
|
||||
toUserId: "1001",
|
||||
rating: 5,
|
||||
sealed: false,
|
||||
createdAt: "2025-01-18T21:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "7011",
|
||||
orderId: "6006",
|
||||
fromUserId: "1002",
|
||||
fromUserName: "玲玲",
|
||||
fromUserAvatar: "/avatars/u2.jpg",
|
||||
toUserId: "1005",
|
||||
rating: 4,
|
||||
content: "挺专业的,就是话不多,不过打得好就行",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-20T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "7012",
|
||||
orderId: "6006",
|
||||
fromUserId: "1005",
|
||||
fromUserName: "俊俊",
|
||||
fromUserAvatar: "/avatars/u4.jpg",
|
||||
toUserId: "1002",
|
||||
rating: 3,
|
||||
content: "中途有点急,催了好几次,下次希望耐心一点",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-20T20:25:00Z",
|
||||
},
|
||||
{
|
||||
id: "7013",
|
||||
orderId: "6007",
|
||||
fromUserId: "1003",
|
||||
fromUserName: "zz",
|
||||
fromUserAvatar: "/avatars/u3.jpg",
|
||||
toUserId: "1006",
|
||||
rating: 2,
|
||||
content: "感觉没有简介里说的那么厉害,好几局都没发挥出来,有点失望",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-22T17:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "7014",
|
||||
orderId: "6007",
|
||||
fromUserId: "1006",
|
||||
fromUserName: "Winter",
|
||||
fromUserAvatar: "/avatars/u1.jpg",
|
||||
toUserId: "1003",
|
||||
rating: 4,
|
||||
content: "配合还可以,就是网络有点卡",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-22T17:50:00Z",
|
||||
},
|
||||
{
|
||||
id: "7015",
|
||||
orderId: "6008",
|
||||
fromUserId: "1004",
|
||||
fromUserName: "莫莫",
|
||||
fromUserAvatar: "/avatars/u4.jpg",
|
||||
toUserId: "1007",
|
||||
rating: 5,
|
||||
content: "超级好!带我连赢了五局,开心死了",
|
||||
sealed: true,
|
||||
createdAt: "2025-01-24T23:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "7016",
|
||||
orderId: "6008",
|
||||
fromUserId: "1007",
|
||||
fromUserName: "琪琪",
|
||||
fromUserAvatar: "/avatars/u2.jpg",
|
||||
toUserId: "1004",
|
||||
rating: 5,
|
||||
content: "很好带,状态也好,合作愉快",
|
||||
sealed: true,
|
||||
createdAt: "2025-01-24T23:15:00Z",
|
||||
},
|
||||
{
|
||||
id: "7017",
|
||||
orderId: "6009",
|
||||
fromUserId: "1001",
|
||||
fromUserName: "小陈",
|
||||
fromUserAvatar: "/avatars/u1.jpg",
|
||||
toUserId: "1008",
|
||||
rating: 4,
|
||||
content: "打得稳,没有骚操作,就是风格比较保守",
|
||||
sealed: false,
|
||||
createdAt: "2025-01-26T19:40:00Z",
|
||||
},
|
||||
{
|
||||
id: "7018",
|
||||
orderId: "6009",
|
||||
fromUserId: "1008",
|
||||
fromUserName: "暗影",
|
||||
fromUserAvatar: "/avatars/u3.jpg",
|
||||
toUserId: "1001",
|
||||
rating: 4,
|
||||
sealed: false,
|
||||
createdAt: "2025-01-26T20:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -1,181 +0,0 @@
|
||||
import type { PlayerService } from "../types"
|
||||
|
||||
export const mockServices: PlayerService[] = [
|
||||
{
|
||||
id: "5001",
|
||||
playerId: "1005",
|
||||
gameId: "2001",
|
||||
gameName: "英雄联盟",
|
||||
title: "LOL双排上分",
|
||||
description: "打得不好说话,但是认真打。黄金到铂金段位都接,不保证赢但保证尽力。",
|
||||
price: 25,
|
||||
unit: "局",
|
||||
rankRange: "黄金-铂金",
|
||||
availability: ["工作日晚上9点后", "周末全天"],
|
||||
},
|
||||
{
|
||||
id: "5002",
|
||||
playerId: "1005",
|
||||
gameId: "2004",
|
||||
gameName: "永劫无间",
|
||||
title: "永劫双人组队",
|
||||
description: "永劫玩了两年多,输出位,跟着我打就行,不用担心被带走。",
|
||||
price: 20,
|
||||
unit: "局",
|
||||
availability: ["每天晚上8点到凌晨1点"],
|
||||
},
|
||||
{
|
||||
id: "5003",
|
||||
playerId: "1005",
|
||||
gameId: "2003",
|
||||
gameName: "CS2",
|
||||
title: "CS2车队位",
|
||||
description: "信使/支援位,不抢枪不乱走,配合好的话胜率挺高的。",
|
||||
price: 22,
|
||||
unit: "局",
|
||||
rankRange: "金级-传奇",
|
||||
availability: ["工作日晚上9点后", "周末下午到凌晨"],
|
||||
},
|
||||
{
|
||||
id: "5004",
|
||||
playerId: "1006",
|
||||
gameId: "2002",
|
||||
gameName: "王者荣耀",
|
||||
title: "王者双排稳上星",
|
||||
description:
|
||||
"服务第一,不催不急,你想打哪个英雄都行,我来配合。段位不高但胜率稳,接过几百单了。",
|
||||
price: 18,
|
||||
unit: "星",
|
||||
rankRange: "钻石-星耀",
|
||||
availability: ["每天下午3点到凌晨"],
|
||||
},
|
||||
{
|
||||
id: "5005",
|
||||
playerId: "1006",
|
||||
gameId: "2001",
|
||||
gameName: "英雄联盟",
|
||||
title: "LOL陪玩轻松局",
|
||||
description: "不想上分只想开心的也可以来,我陪你打,不骂人不催,聊天也行。",
|
||||
price: 15,
|
||||
unit: "局",
|
||||
rankRange: "不限",
|
||||
availability: ["每天都有空,提前说一声"],
|
||||
},
|
||||
{
|
||||
id: "5006",
|
||||
playerId: "1006",
|
||||
gameId: "2011",
|
||||
gameName: "第五人格",
|
||||
title: "第五人格求生者陪玩",
|
||||
description: "求生者主,各个角色都会,带你赢监管者。新手也接,慢慢教。",
|
||||
price: 20,
|
||||
unit: "局",
|
||||
availability: ["周末全天", "工作日晚上8点后"],
|
||||
},
|
||||
{
|
||||
id: "5007",
|
||||
playerId: "1007",
|
||||
gameId: "2002",
|
||||
gameName: "王者荣耀",
|
||||
title: "王者女生陪玩双排",
|
||||
description: "女生打手,段位星耀,不接受质疑我的操作。认真打的来,想找人聊天的别来。",
|
||||
price: 28,
|
||||
unit: "星",
|
||||
rankRange: "铂金-王者",
|
||||
availability: ["每天晚上7点到12点"],
|
||||
},
|
||||
{
|
||||
id: "5008",
|
||||
playerId: "1007",
|
||||
gameId: "2006",
|
||||
gameName: "和平精英",
|
||||
title: "和平精英吃鸡陪玩",
|
||||
description: "和平玩了三年,枪法稳,带你吃鸡。不喜欢乱冲的,打法偏稳健。",
|
||||
price: 22,
|
||||
unit: "局",
|
||||
rankRange: "白金-王牌",
|
||||
availability: ["周末全天", "工作日晚上8点后"],
|
||||
},
|
||||
{
|
||||
id: "5009",
|
||||
playerId: "1007",
|
||||
gameId: "2009",
|
||||
gameName: "绝区零",
|
||||
title: "绝区零日常代肝",
|
||||
description: "每天日常、周常都帮你做,不漏活动,有什么特殊需求说一声。",
|
||||
price: 18,
|
||||
unit: "次",
|
||||
availability: ["每天下午到晚上"],
|
||||
},
|
||||
{
|
||||
id: "5010",
|
||||
playerId: "1008",
|
||||
gameId: "2008",
|
||||
gameName: "无畏契约",
|
||||
title: "无畏契约上分",
|
||||
description: "不多说,看战绩。",
|
||||
price: 45,
|
||||
unit: "局",
|
||||
rankRange: "铁-白金",
|
||||
availability: ["晚上10点后"],
|
||||
},
|
||||
{
|
||||
id: "5011",
|
||||
playerId: "1008",
|
||||
gameId: "2007",
|
||||
gameName: "DOTA2",
|
||||
title: "DOTA2组排",
|
||||
description: "DOTA老玩家,各位置都行,不废话,进来打就是了。",
|
||||
price: 30,
|
||||
unit: "局",
|
||||
rankRange: "herald-legend",
|
||||
availability: ["每天凌晨前都在"],
|
||||
},
|
||||
{
|
||||
id: "5012",
|
||||
playerId: "1008",
|
||||
gameId: "2003",
|
||||
gameName: "CS2",
|
||||
title: "CS2上分代打",
|
||||
description: "只接代打,不陪玩。效率高,不磨蹭。",
|
||||
price: 60,
|
||||
unit: "局",
|
||||
rankRange: "银级-金级",
|
||||
availability: ["不定时,接单后尽快开始"],
|
||||
},
|
||||
{
|
||||
id: "5013",
|
||||
playerId: "1009",
|
||||
gameId: "2001",
|
||||
gameName: "英雄联盟",
|
||||
title: "LOL稳定双排",
|
||||
description: "接单稳,不掉线,说几点上就几点上。打辅助和打野,配合你的节奏走。",
|
||||
price: 20,
|
||||
unit: "局",
|
||||
rankRange: "白银-钻石",
|
||||
availability: ["工作日晚上8点后", "周末下午开始"],
|
||||
},
|
||||
{
|
||||
id: "5014",
|
||||
playerId: "1009",
|
||||
gameId: "2010",
|
||||
gameName: "崩坏:星穹铁道",
|
||||
title: "星铁日常代肝",
|
||||
description: "每日任务、模拟宇宙、忘却之庭都做,体力全清,活动不落。长期单子优先。",
|
||||
price: 15,
|
||||
unit: "次",
|
||||
availability: ["每天都有,早上到晚上都行"],
|
||||
},
|
||||
{
|
||||
id: "5015",
|
||||
playerId: "1009",
|
||||
gameId: "2012",
|
||||
gameName: "三角洲行动",
|
||||
title: "三角洲行动组队",
|
||||
description: "三角洲玩得比较多,战术打法,不乱冲。稳定上线,说好时间不会放鸽子。",
|
||||
price: 25,
|
||||
unit: "局",
|
||||
rankRange: "不限",
|
||||
availability: ["每天晚上8点到凌晨"],
|
||||
},
|
||||
]
|
||||
@@ -1,88 +0,0 @@
|
||||
import type { Shop } from "../types"
|
||||
import { mockUsers } from "./users"
|
||||
|
||||
export const mockShops: Shop[] = [
|
||||
{
|
||||
id: "3001",
|
||||
owner: mockUsers[9],
|
||||
name: "老王游戏工作室",
|
||||
banner: "/banners/shop1.jpg",
|
||||
description:
|
||||
"做了三年了,老客户都知道我们靠谱。团队十几个人,各种游戏都有人带,不接单就不派,质量有保障。",
|
||||
rating: 4.7,
|
||||
totalOrders: 3842,
|
||||
playerCount: 14,
|
||||
commissionType: "percentage",
|
||||
commissionValue: 15,
|
||||
allowMultiShop: false,
|
||||
allowIndependentOrders: false,
|
||||
dispatchMode: "manual",
|
||||
announcements: [
|
||||
"新人进店先看公告,接单前确认好游戏段位要求",
|
||||
"每天 12:00-24:00 正常营业,节假日不休",
|
||||
"有问题直接找客服,不要私聊陪玩",
|
||||
],
|
||||
templateConfig: {
|
||||
sections: [
|
||||
{ type: "banner", enabled: true, order: 1 },
|
||||
{ type: "intro", enabled: true, order: 2 },
|
||||
{ type: "services", enabled: true, order: 3 },
|
||||
{ type: "players", enabled: true, order: 4 },
|
||||
{ type: "announcements", enabled: true, order: 5 },
|
||||
{ type: "reviews", enabled: true, order: 6 },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "3002",
|
||||
owner: mockUsers[10],
|
||||
name: "Yuki 小屋",
|
||||
description:
|
||||
"小店不追求量,就想好好做。陪玩都是我自己挑的,玩得好、态度好才能留下来。自动派单,接了就会认真打。",
|
||||
rating: 4.5,
|
||||
totalOrders: 671,
|
||||
playerCount: 5,
|
||||
commissionType: "percentage",
|
||||
commissionValue: 12,
|
||||
allowMultiShop: true,
|
||||
allowIndependentOrders: true,
|
||||
dispatchMode: "auto",
|
||||
announcements: ["单子接了就会打完,中途不跑单", "有特殊需求下单前备注一下"],
|
||||
templateConfig: {
|
||||
sections: [
|
||||
{ type: "banner", enabled: false, order: 1 },
|
||||
{ type: "intro", enabled: true, order: 2 },
|
||||
{ type: "players", enabled: true, order: 3 },
|
||||
{ type: "services", enabled: true, order: 4 },
|
||||
{ type: "reviews", enabled: true, order: 5 },
|
||||
{ type: "announcements", enabled: true, order: 6 },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "3003",
|
||||
owner: mockUsers[11],
|
||||
name: "浩哥开黑",
|
||||
description:
|
||||
"刚开店,还在摸索中。我自己是老玩家了,带人打球没问题,就是店还没啥名气,价格实惠,欢迎来试试。",
|
||||
rating: 3.9,
|
||||
totalOrders: 88,
|
||||
playerCount: 3,
|
||||
commissionType: "fixed",
|
||||
commissionValue: 8,
|
||||
allowMultiShop: true,
|
||||
allowIndependentOrders: false,
|
||||
dispatchMode: "manual",
|
||||
announcements: ["新店开业,有问题随时找我"],
|
||||
templateConfig: {
|
||||
sections: [
|
||||
{ type: "banner", enabled: false, order: 1 },
|
||||
{ type: "intro", enabled: true, order: 2 },
|
||||
{ type: "services", enabled: true, order: 3 },
|
||||
{ type: "players", enabled: true, order: 4 },
|
||||
{ type: "announcements", enabled: true, order: 5 },
|
||||
{ type: "reviews", enabled: false, order: 6 },
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
@@ -1,139 +0,0 @@
|
||||
import type { WalletTransaction } from "../types"
|
||||
|
||||
export const mockTransactions: WalletTransaction[] = [
|
||||
{
|
||||
id: "9401",
|
||||
type: "topup",
|
||||
amount: 500,
|
||||
description: "充值",
|
||||
createdAt: "2025-01-03T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9402",
|
||||
type: "payment",
|
||||
amount: -75,
|
||||
description: "支付订单 6001",
|
||||
createdAt: "2025-01-05T19:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9403",
|
||||
type: "payment",
|
||||
amount: -54,
|
||||
description: "支付订单 6002",
|
||||
createdAt: "2025-01-08T15:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9404",
|
||||
type: "topup",
|
||||
amount: 300,
|
||||
description: "充值",
|
||||
createdAt: "2025-01-15T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9405",
|
||||
type: "payment",
|
||||
amount: -60,
|
||||
description: "支付订单 6005",
|
||||
createdAt: "2025-01-17T20:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9406",
|
||||
type: "payment",
|
||||
amount: -90,
|
||||
description: "支付订单 6003",
|
||||
createdAt: "2025-01-11T22:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9407",
|
||||
type: "payment",
|
||||
amount: -44,
|
||||
description: "支付订单 6004",
|
||||
createdAt: "2025-01-14T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9408",
|
||||
type: "refund",
|
||||
amount: 44,
|
||||
description: "订单 6015 退款",
|
||||
createdAt: "2025-02-16T18:10:00Z",
|
||||
},
|
||||
{
|
||||
id: "9409",
|
||||
type: "topup",
|
||||
amount: 200,
|
||||
description: "充值",
|
||||
createdAt: "2025-02-01T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9410",
|
||||
type: "payment",
|
||||
amount: -40,
|
||||
description: "支付订单 6008",
|
||||
createdAt: "2025-02-01T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9411",
|
||||
type: "payment",
|
||||
amount: -120,
|
||||
description: "支付订单 6009",
|
||||
createdAt: "2025-02-03T22:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9412",
|
||||
type: "payment",
|
||||
amount: -84,
|
||||
description: "支付订单 6010",
|
||||
createdAt: "2025-02-06T19:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9413",
|
||||
type: "payment",
|
||||
amount: -50,
|
||||
description: "支付订单 6011",
|
||||
createdAt: "2025-02-08T21:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9414",
|
||||
type: "payment",
|
||||
amount: -30,
|
||||
description: "支付订单 6012",
|
||||
createdAt: "2025-02-10T20:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9415",
|
||||
type: "payment",
|
||||
amount: -18,
|
||||
description: "支付订单 6013",
|
||||
createdAt: "2025-02-12T14:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9416",
|
||||
type: "payment",
|
||||
amount: -60,
|
||||
description: "支付订单 6014",
|
||||
createdAt: "2025-02-14T21:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9417",
|
||||
type: "income",
|
||||
amount: 63.75,
|
||||
description: "订单 6001 收入(扣除15%抽成)",
|
||||
createdAt: "2025-01-05T22:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "9418",
|
||||
type: "income",
|
||||
amount: 47.52,
|
||||
description: "订单 6002 收入(扣除12%抽成)",
|
||||
createdAt: "2025-01-08T18:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "9419",
|
||||
type: "withdrawal",
|
||||
amount: -100,
|
||||
description: "提现到银行卡",
|
||||
createdAt: "2025-01-20T14:00:00Z",
|
||||
},
|
||||
]
|
||||
|
||||
export const walletBalance = 275
|
||||
@@ -1,131 +0,0 @@
|
||||
import type { User } from "../types"
|
||||
|
||||
export const mockUsers: User[] = [
|
||||
{
|
||||
id: "1001",
|
||||
username: "xiao_chen2333",
|
||||
email: "xiao_chen2333@example.com",
|
||||
nickname: "小陈",
|
||||
avatar: "/avatars/u1.jpg",
|
||||
role: "consumer",
|
||||
phone: "138****2047",
|
||||
bio: "下班打两把放松,别催我",
|
||||
createdAt: "2024-07-12T10:23:00Z",
|
||||
},
|
||||
{
|
||||
id: "1002",
|
||||
username: "lingling_up",
|
||||
email: "lingling_up@example.com",
|
||||
nickname: "玲玲",
|
||||
avatar: "/avatars/u2.jpg",
|
||||
role: "consumer",
|
||||
phone: "177****8831",
|
||||
bio: "周末通宵选手",
|
||||
createdAt: "2024-08-03T15:44:00Z",
|
||||
},
|
||||
{
|
||||
id: "1003",
|
||||
username: "zz_noob99",
|
||||
email: "zz_noob99@example.com",
|
||||
nickname: "zz",
|
||||
avatar: "/avatars/u3.jpg",
|
||||
role: "consumer",
|
||||
createdAt: "2024-09-20T09:11:00Z",
|
||||
},
|
||||
{
|
||||
id: "1004",
|
||||
username: "MoMo_1107",
|
||||
email: "MoMo_1107@example.com",
|
||||
nickname: "莫莫",
|
||||
avatar: "/avatars/u4.jpg",
|
||||
role: "consumer",
|
||||
phone: "152****6603",
|
||||
bio: "只玩排位不玩娱乐",
|
||||
createdAt: "2024-11-05T21:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "1005",
|
||||
username: "ace_junjun",
|
||||
email: "ace_junjun@example.com",
|
||||
nickname: "俊俊",
|
||||
avatar: "/avatars/u5.jpg",
|
||||
role: "player",
|
||||
phone: "186****4419",
|
||||
bio: "不太会说话但是会认真打",
|
||||
createdAt: "2024-06-18T13:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "1006",
|
||||
username: "w1nter_gg",
|
||||
email: "w1nter_gg@example.com",
|
||||
nickname: "Winter",
|
||||
avatar: "/avatars/u1.jpg",
|
||||
role: "player",
|
||||
bio: "段位不代表实力,服务第一",
|
||||
createdAt: "2024-07-29T18:55:00Z",
|
||||
},
|
||||
{
|
||||
id: "1007",
|
||||
username: "qiqi_carry",
|
||||
email: "qiqi_carry@example.com",
|
||||
nickname: "琪琪",
|
||||
avatar: "/avatars/u2.jpg",
|
||||
role: "player",
|
||||
phone: "139****7720",
|
||||
bio: "女生打手,不接受质疑",
|
||||
createdAt: "2024-08-14T11:22:00Z",
|
||||
},
|
||||
{
|
||||
id: "1008",
|
||||
username: "darkk_solo",
|
||||
email: "darkk_solo@example.com",
|
||||
nickname: "暗影",
|
||||
avatar: "/avatars/u3.jpg",
|
||||
role: "player",
|
||||
createdAt: "2024-10-01T08:40:00Z",
|
||||
},
|
||||
{
|
||||
id: "1009",
|
||||
username: "feifei_top1",
|
||||
email: "feifei_top1@example.com",
|
||||
nickname: "飞飞",
|
||||
avatar: "/avatars/u4.jpg",
|
||||
role: "player",
|
||||
phone: "173****5582",
|
||||
bio: "接单稳,不掉线",
|
||||
createdAt: "2024-12-09T20:15:00Z",
|
||||
},
|
||||
{
|
||||
id: "1010",
|
||||
username: "boss_laowang",
|
||||
email: "boss_laowang@example.com",
|
||||
nickname: "老王",
|
||||
avatar: "/avatars/u5.jpg",
|
||||
role: "owner",
|
||||
phone: "135****0094",
|
||||
bio: "开店三年,靠谱",
|
||||
createdAt: "2024-06-01T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "1011",
|
||||
username: "yuki_studio",
|
||||
email: "yuki_studio@example.com",
|
||||
nickname: "Yuki",
|
||||
avatar: "/avatars/u1.jpg",
|
||||
role: "owner",
|
||||
phone: "158****3367",
|
||||
bio: "小店慢慢做,质量不将就",
|
||||
createdAt: "2024-09-07T14:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "1012",
|
||||
username: "hao_ge_gg",
|
||||
email: "hao_ge_gg@example.com",
|
||||
nickname: "浩哥",
|
||||
avatar: "/avatars/u2.jpg",
|
||||
role: "owner",
|
||||
createdAt: "2025-01-15T16:48:00Z",
|
||||
},
|
||||
]
|
||||
|
||||
export const currentUser = mockUsers[0]
|
||||
+4
-5
@@ -1,5 +1,4 @@
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockChatMessages, mockChatSessions, mockUsers } from "@/lib/mock"
|
||||
import type { ChatMessage, ChatSession, Order } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -11,8 +10,8 @@ interface ChatState {
|
||||
sendImageMessage: (sessionId: string, actorId: string, imageUrl: string) => void
|
||||
}
|
||||
|
||||
function resolveAvatar(userId: string) {
|
||||
return mockUsers.find((user) => user.id === userId)?.avatar ?? ""
|
||||
function resolveAvatar(_userId: string) {
|
||||
return ""
|
||||
}
|
||||
|
||||
function shouldReadonly(status: Order["status"]) {
|
||||
@@ -20,8 +19,8 @@ function shouldReadonly(status: Order["status"]) {
|
||||
}
|
||||
|
||||
export const useChatStore = create<ChatState>((set, get) => ({
|
||||
sessions: mockChatSessions,
|
||||
messages: mockChatMessages,
|
||||
sessions: [],
|
||||
messages: [],
|
||||
ensureOrderSession: (order) => {
|
||||
const existing = get().sessions.find(
|
||||
(session) => session.type === "order" && session.orderId === order.id,
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockComments } from "@/lib/mock"
|
||||
import type { Comment, User } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -10,7 +9,7 @@ interface CommentState {
|
||||
}
|
||||
|
||||
export const useCommentStore = create<CommentState>((set) => ({
|
||||
comments: mockComments,
|
||||
comments: [],
|
||||
addComment: (postId, author, content) => {
|
||||
const normalizedContent = content.trim()
|
||||
if (!normalizedContent) return null
|
||||
|
||||
+1
-37
@@ -3,7 +3,6 @@ import { DISPUTE_TO_RESOLVED_MS, DISPUTE_TO_REVIEWING_MS } from "@/lib/config/de
|
||||
import { allow, deny } from "@/lib/decision"
|
||||
import type { ApiDecision } from "@/lib/errors"
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockDisputes } from "@/lib/mock"
|
||||
import type { Dispute } from "@/lib/types"
|
||||
import { useAuthStore } from "@/store/auth"
|
||||
import { useNotificationStore } from "@/store/notifications"
|
||||
@@ -87,41 +86,6 @@ function resolveParticipantActor(orderId: string, userId: string): Actor | null
|
||||
return null
|
||||
}
|
||||
|
||||
function asRecord(dispute: Dispute): DisputeRecord {
|
||||
const timeline: DisputeTimelineItem[] = [
|
||||
{
|
||||
id: generateId("timeline"),
|
||||
type: "created",
|
||||
content: `${dispute.initiatorName} 提交争议`,
|
||||
createdAt: dispute.createdAt,
|
||||
},
|
||||
]
|
||||
|
||||
if (dispute.status === "reviewing") {
|
||||
timeline.push({
|
||||
id: generateId("timeline"),
|
||||
type: "reviewing",
|
||||
content: "平台已受理并进入审核",
|
||||
createdAt: dispute.createdAt,
|
||||
})
|
||||
}
|
||||
|
||||
if (dispute.status === "resolved") {
|
||||
timeline.push({
|
||||
id: generateId("timeline"),
|
||||
type: "resolved",
|
||||
content: "平台已给出仲裁结果",
|
||||
createdAt: dispute.createdAt,
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
...dispute,
|
||||
respondentEvidence: [],
|
||||
timeline,
|
||||
}
|
||||
}
|
||||
|
||||
function notifyDispute(orderId: string, title: string, content: string) {
|
||||
if (!useAuthStore.getState().notificationPrefs.order) {
|
||||
return
|
||||
@@ -200,7 +164,7 @@ export const useDisputeStore = create<DisputeState>((set, get) => {
|
||||
}
|
||||
|
||||
return {
|
||||
disputes: mockDisputes.map(asRecord),
|
||||
disputes: [],
|
||||
getDisputeByOrderId: (orderId) => get().disputes.find((dispute) => dispute.orderId === orderId),
|
||||
submitDispute: (input) => {
|
||||
const order = useOrderStore.getState().orders.find((item) => item.id === input.orderId)
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockFavorites } from "@/lib/mock"
|
||||
import type { Favorite } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -11,7 +10,7 @@ interface FavoriteState {
|
||||
}
|
||||
|
||||
export const useFavoriteStore = create<FavoriteState>((set, get) => ({
|
||||
favorites: mockFavorites,
|
||||
favorites: [],
|
||||
listFavoritesByUser: (userId) => get().favorites.filter((favorite) => favorite.userId === userId),
|
||||
isFavorited: (userId, targetType, targetId) =>
|
||||
get().favorites.some(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockNotifications } from "@/lib/mock"
|
||||
import type { Notification } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -18,7 +17,7 @@ interface NotificationState {
|
||||
}
|
||||
|
||||
export const useNotificationStore = create<NotificationState>((set) => ({
|
||||
notifications: mockNotifications,
|
||||
notifications: [],
|
||||
addNotification: (input) => {
|
||||
const notification: Notification = {
|
||||
id: generateId("notif"),
|
||||
|
||||
+1
-2
@@ -8,7 +8,6 @@ import { allow, deny } from "@/lib/decision"
|
||||
import { evaluateOrderTransition, type OrderAction } from "@/lib/domain/order-machine"
|
||||
import type { ApiDecision } from "@/lib/errors"
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockOrders } from "@/lib/mock"
|
||||
import type { Order, OrderStatus } from "@/lib/types"
|
||||
import { useAuthStore } from "@/store/auth"
|
||||
import { useChatStore } from "@/store/chat"
|
||||
@@ -301,7 +300,7 @@ export const useOrderStore = create<OrderState>((set, get) => {
|
||||
}
|
||||
|
||||
return {
|
||||
orders: mockOrders,
|
||||
orders: [],
|
||||
createOrder: (input, actor) => {
|
||||
if (actor.role !== "consumer") {
|
||||
return { decision: deny(403, "仅客户可下单") }
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
import { mockPlayers } from "@/lib/mock"
|
||||
import type { Player } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -9,7 +8,7 @@ interface PlayerState {
|
||||
}
|
||||
|
||||
export const usePlayerStore = create<PlayerState>((set) => ({
|
||||
players: mockPlayers,
|
||||
players: [],
|
||||
assignToShop: (playerId, shopId, shopName) =>
|
||||
set((state) => ({
|
||||
players: state.players.map((player) =>
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockPosts } from "@/lib/mock"
|
||||
import type { Post, User, UserRole } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -22,7 +21,7 @@ interface PostState {
|
||||
}
|
||||
|
||||
export const usePostStore = create<PostState>((set) => ({
|
||||
posts: mockPosts,
|
||||
posts: [],
|
||||
createPost: (input) => {
|
||||
const post: Post = {
|
||||
id: generateId("post"),
|
||||
|
||||
+2
-8
@@ -1,7 +1,6 @@
|
||||
import { allow, deny } from "@/lib/decision"
|
||||
import type { ApiDecision } from "@/lib/errors"
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockReviews, mockUsers } from "@/lib/mock"
|
||||
import type { Review } from "@/lib/types"
|
||||
import { useOrderStore } from "@/store/orders"
|
||||
import { create } from "zustand"
|
||||
@@ -20,10 +19,6 @@ interface ReviewState {
|
||||
hasUserReviewed: (orderId: string, userId: string) => boolean
|
||||
}
|
||||
|
||||
function resolveUser(userId: string) {
|
||||
return mockUsers.find((user) => user.id === userId)
|
||||
}
|
||||
|
||||
function resolveOrderUser(orderId: string, userId: string) {
|
||||
const order = useOrderStore.getState().orders.find((item) => item.id === orderId)
|
||||
if (!order) return null
|
||||
@@ -48,7 +43,7 @@ function resolveOrderUser(orderId: string, userId: string) {
|
||||
}
|
||||
|
||||
export const useReviewStore = create<ReviewState>((set, get) => ({
|
||||
reviews: mockReviews,
|
||||
reviews: [],
|
||||
getReviewsByOrder: (orderId) => get().reviews.filter((review) => review.orderId === orderId),
|
||||
hasUserReviewed: (orderId, userId) =>
|
||||
get().reviews.some((review) => review.orderId === orderId && review.fromUserId === userId),
|
||||
@@ -80,7 +75,6 @@ export const useReviewStore = create<ReviewState>((set, get) => ({
|
||||
return deny(400, "该订单已提交过评价")
|
||||
}
|
||||
|
||||
const fromUser = resolveUser(input.fromUserId)
|
||||
const createdAt = new Date().toISOString()
|
||||
|
||||
const review: Review = {
|
||||
@@ -88,7 +82,7 @@ export const useReviewStore = create<ReviewState>((set, get) => ({
|
||||
orderId: input.orderId,
|
||||
fromUserId: input.fromUserId,
|
||||
fromUserName: relation.fromUserName,
|
||||
fromUserAvatar: fromUser?.avatar ?? "",
|
||||
fromUserAvatar: "",
|
||||
toUserId: relation.toUserId,
|
||||
rating: input.rating,
|
||||
content: input.content?.trim() || undefined,
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockServices } from "@/lib/mock"
|
||||
import type { PlayerService } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -11,7 +10,7 @@ interface ServiceState {
|
||||
}
|
||||
|
||||
export const useServiceStore = create<ServiceState>((set) => ({
|
||||
services: mockServices,
|
||||
services: [],
|
||||
createService: (service) =>
|
||||
set((state) => ({
|
||||
services: [
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
import { mockShops } from "@/lib/mock"
|
||||
import type { Shop, ShopSection } from "@/lib/types"
|
||||
import { create } from "zustand"
|
||||
|
||||
@@ -11,7 +10,7 @@ interface ShopState {
|
||||
}
|
||||
|
||||
export const useShopStore = create<ShopState>((set) => ({
|
||||
shops: mockShops,
|
||||
shops: [],
|
||||
updateShop: (shopId, patch) =>
|
||||
set((state) => ({
|
||||
shops: state.shops.map((shop) => (shop.id === shopId ? { ...shop, ...patch } : shop)),
|
||||
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
import { calculateOrderIncome } from "@/lib/domain/income"
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockTransactions, walletBalance } from "@/lib/mock"
|
||||
import type { WalletTransaction } from "@/lib/types"
|
||||
import { useShopStore } from "@/store/shops"
|
||||
import { create } from "zustand"
|
||||
@@ -17,8 +16,8 @@ interface WalletState {
|
||||
}
|
||||
|
||||
export const useWalletStore = create<WalletState>((set, get) => ({
|
||||
balance: walletBalance,
|
||||
transactions: mockTransactions,
|
||||
balance: 0,
|
||||
transactions: [],
|
||||
topUp: (amount) => {
|
||||
if (!Number.isFinite(amount) || amount <= 0) return
|
||||
const now = new Date().toISOString()
|
||||
|
||||
Reference in New Issue
Block a user