diff --git a/app/(account)/layout.tsx b/app/(account)/layout.tsx new file mode 100644 index 0000000..80590d4 --- /dev/null +++ b/app/(account)/layout.tsx @@ -0,0 +1,16 @@ +export default function AccountLayout({ children }: { children: React.ReactNode }) { + return ( +
+ +
{children}
+
+ ) +} diff --git a/app/(account)/notifications/page.tsx b/app/(account)/notifications/page.tsx new file mode 100644 index 0000000..a1f004c --- /dev/null +++ b/app/(account)/notifications/page.tsx @@ -0,0 +1,8 @@ +export default function NotificationsPage() { + return ( +
+

通知中心

+

订单通知、社区通知、系统通知

+
+ ) +} diff --git a/app/(account)/settings/page.tsx b/app/(account)/settings/page.tsx new file mode 100644 index 0000000..0fcc675 --- /dev/null +++ b/app/(account)/settings/page.tsx @@ -0,0 +1,8 @@ +export default function SettingsPage() { + return ( +
+

个人设置

+

资料编辑、身份切换、联系方式、通知偏好

+
+ ) +} diff --git a/app/(account)/verify/page.tsx b/app/(account)/verify/page.tsx new file mode 100644 index 0000000..86814a4 --- /dev/null +++ b/app/(account)/verify/page.tsx @@ -0,0 +1,8 @@ +export default function VerifyPage() { + return ( +
+

身份认证

+

申请打手或店主身份认证

+
+ ) +} diff --git a/app/(account)/wallet/page.tsx b/app/(account)/wallet/page.tsx new file mode 100644 index 0000000..d9c542d --- /dev/null +++ b/app/(account)/wallet/page.tsx @@ -0,0 +1,8 @@ +export default function WalletPage() { + return ( +
+

钱包

+

充值、余额、支付记录、收入明细、提现

+
+ ) +} diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx new file mode 100644 index 0000000..ec665c5 --- /dev/null +++ b/app/(auth)/layout.tsx @@ -0,0 +1,9 @@ +export default function AuthLayout({ children }: { children: React.ReactNode }) { + return ( +
+
+ {children} +
+
+ ) +} diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx new file mode 100644 index 0000000..bb7cd40 --- /dev/null +++ b/app/(auth)/login/page.tsx @@ -0,0 +1,8 @@ +export default function LoginPage() { + return ( +
+

登录

+

登录你的聚玩账号

+
+ ) +} diff --git a/app/(auth)/register/page.tsx b/app/(auth)/register/page.tsx new file mode 100644 index 0000000..8fc450e --- /dev/null +++ b/app/(auth)/register/page.tsx @@ -0,0 +1,8 @@ +export default function RegisterPage() { + return ( +
+

注册

+

创建你的聚玩账号

+
+ ) +} diff --git a/app/(dashboard)/dashboard/page.tsx b/app/(dashboard)/dashboard/page.tsx new file mode 100644 index 0000000..af3bcb9 --- /dev/null +++ b/app/(dashboard)/dashboard/page.tsx @@ -0,0 +1,8 @@ +export default function DashboardPage() { + return ( +
+

管理后台

+

根据当前身份显示对应的管理面板

+
+ ) +} diff --git a/app/(dashboard)/dashboard/services/new/page.tsx b/app/(dashboard)/dashboard/services/new/page.tsx new file mode 100644 index 0000000..a3c2550 --- /dev/null +++ b/app/(dashboard)/dashboard/services/new/page.tsx @@ -0,0 +1,8 @@ +export default function NewServicePage() { + return ( +
+

发布服务

+

创建或编辑陪玩服务

+
+ ) +} diff --git a/app/(dashboard)/dashboard/services/page.tsx b/app/(dashboard)/dashboard/services/page.tsx new file mode 100644 index 0000000..fc37c21 --- /dev/null +++ b/app/(dashboard)/dashboard/services/page.tsx @@ -0,0 +1,8 @@ +export default function ServicesPage() { + return ( +
+

服务管理

+

管理已发布的陪玩服务

+
+ ) +} diff --git a/app/(dashboard)/dashboard/shop/employees/page.tsx b/app/(dashboard)/dashboard/shop/employees/page.tsx new file mode 100644 index 0000000..4efbde6 --- /dev/null +++ b/app/(dashboard)/dashboard/shop/employees/page.tsx @@ -0,0 +1,8 @@ +export default function EmployeesPage() { + return ( +
+

员工管理

+

邀请、移除打手,设置抽成

+
+ ) +} diff --git a/app/(dashboard)/dashboard/shop/page.tsx b/app/(dashboard)/dashboard/shop/page.tsx new file mode 100644 index 0000000..f06a87a --- /dev/null +++ b/app/(dashboard)/dashboard/shop/page.tsx @@ -0,0 +1,8 @@ +export default function ShopManagementPage() { + return ( +
+

店铺管理

+

店铺信息、活动、订单总览、收入统计

+
+ ) +} diff --git a/app/(dashboard)/dashboard/shop/templates/page.tsx b/app/(dashboard)/dashboard/shop/templates/page.tsx new file mode 100644 index 0000000..67b5c1d --- /dev/null +++ b/app/(dashboard)/dashboard/shop/templates/page.tsx @@ -0,0 +1,8 @@ +export default function ShopTemplatesPage() { + return ( +
+

店铺模板

+

编辑店铺主页模板组件

+
+ ) +} diff --git a/app/(dashboard)/layout.tsx b/app/(dashboard)/layout.tsx new file mode 100644 index 0000000..af93192 --- /dev/null +++ b/app/(dashboard)/layout.tsx @@ -0,0 +1,15 @@ +export default function DashboardLayout({ children }: { children: React.ReactNode }) { + return ( +
+ +
{children}
+
+ ) +} diff --git a/app/(main)/community/page.tsx b/app/(main)/community/page.tsx new file mode 100644 index 0000000..e4a01ef --- /dev/null +++ b/app/(main)/community/page.tsx @@ -0,0 +1,8 @@ +export default function CommunityPage() { + return ( +
+

社区

+

浏览帖子、秀单、讨论

+
+ ) +} diff --git a/app/(main)/layout.tsx b/app/(main)/layout.tsx new file mode 100644 index 0000000..27a0c33 --- /dev/null +++ b/app/(main)/layout.tsx @@ -0,0 +1,20 @@ +export default function MainLayout({ children }: { children: React.ReactNode }) { + return ( +
+
+ +
+
{children}
+ +
+ ) +} diff --git a/app/(main)/page.tsx b/app/(main)/page.tsx new file mode 100644 index 0000000..8e270ac --- /dev/null +++ b/app/(main)/page.tsx @@ -0,0 +1,22 @@ +export default function HomePage() { + return ( +
+

聚玩

+

游戏陪玩服务平台

+
+
+

游戏分类

+

按游戏浏览陪玩服务

+
+
+

推荐打手

+

热门打手推荐

+
+
+

热门店铺

+

优质店铺推荐

+
+
+
+ ) +} diff --git a/app/(main)/player/[id]/page.tsx b/app/(main)/player/[id]/page.tsx new file mode 100644 index 0000000..0160e88 --- /dev/null +++ b/app/(main)/player/[id]/page.tsx @@ -0,0 +1,8 @@ +export default function PlayerDetailPage({ params: _params }: { params: Promise<{ id: string }> }) { + return ( +
+

打手详情

+

评分、服务列表、评价、所属店铺

+
+ ) +} diff --git a/app/(main)/post/[id]/page.tsx b/app/(main)/post/[id]/page.tsx new file mode 100644 index 0000000..603240e --- /dev/null +++ b/app/(main)/post/[id]/page.tsx @@ -0,0 +1,8 @@ +export default function PostDetailPage({ params: _params }: { params: Promise<{ id: string }> }) { + return ( +
+

帖子详情

+

帖子内容、评论区

+
+ ) +} diff --git a/app/(main)/post/new/page.tsx b/app/(main)/post/new/page.tsx new file mode 100644 index 0000000..1f0b08f --- /dev/null +++ b/app/(main)/post/new/page.tsx @@ -0,0 +1,8 @@ +export default function NewPostPage() { + return ( +
+

发帖

+

发布普通帖、秀单帖或引用帖

+
+ ) +} diff --git a/app/(main)/search/page.tsx b/app/(main)/search/page.tsx new file mode 100644 index 0000000..622582c --- /dev/null +++ b/app/(main)/search/page.tsx @@ -0,0 +1,8 @@ +export default function SearchPage() { + return ( +
+

搜索

+

搜索打手、店铺和服务

+
+ ) +} diff --git a/app/(main)/shop/[id]/page.tsx b/app/(main)/shop/[id]/page.tsx new file mode 100644 index 0000000..eea668a --- /dev/null +++ b/app/(main)/shop/[id]/page.tsx @@ -0,0 +1,8 @@ +export default function ShopDetailPage({ params: _params }: { params: Promise<{ id: string }> }) { + return ( +
+

店铺详情

+

店铺主页、服务列表、打手列表

+
+ ) +} diff --git a/app/(order)/chat/[id]/page.tsx b/app/(order)/chat/[id]/page.tsx new file mode 100644 index 0000000..94af656 --- /dev/null +++ b/app/(order)/chat/[id]/page.tsx @@ -0,0 +1,8 @@ +export default function ChatDetailPage({ params: _params }: { params: Promise<{ id: string }> }) { + return ( +
+

聊天

+

与打手沟通

+
+ ) +} diff --git a/app/(order)/chat/page.tsx b/app/(order)/chat/page.tsx new file mode 100644 index 0000000..38d9a73 --- /dev/null +++ b/app/(order)/chat/page.tsx @@ -0,0 +1,8 @@ +export default function ChatListPage() { + return ( +
+

消息

+

咨询会话和订单会话

+
+ ) +} diff --git a/app/(order)/dispute/[id]/page.tsx b/app/(order)/dispute/[id]/page.tsx new file mode 100644 index 0000000..1d1f1ea --- /dev/null +++ b/app/(order)/dispute/[id]/page.tsx @@ -0,0 +1,8 @@ +export default function DisputePage({ params: _params }: { params: Promise<{ id: string }> }) { + return ( +
+

争议仲裁

+

提交争议说明和证据

+
+ ) +} diff --git a/app/(order)/layout.tsx b/app/(order)/layout.tsx new file mode 100644 index 0000000..c13be86 --- /dev/null +++ b/app/(order)/layout.tsx @@ -0,0 +1,3 @@ +export default function OrderLayout({ children }: { children: React.ReactNode }) { + return
{children}
+} diff --git a/app/(order)/order/[id]/page.tsx b/app/(order)/order/[id]/page.tsx new file mode 100644 index 0000000..e02b098 --- /dev/null +++ b/app/(order)/order/[id]/page.tsx @@ -0,0 +1,8 @@ +export default function OrderDetailPage({ params: _params }: { params: Promise<{ id: string }> }) { + return ( +
+

订单详情

+

订单状态、聊天、评价、争议

+
+ ) +} diff --git a/app/(order)/orders/page.tsx b/app/(order)/orders/page.tsx new file mode 100644 index 0000000..81df8f7 --- /dev/null +++ b/app/(order)/orders/page.tsx @@ -0,0 +1,8 @@ +export default function OrderListPage() { + return ( +
+

我的订单

+

查看和管理订单

+
+ ) +} diff --git a/app/(order)/review/[id]/page.tsx b/app/(order)/review/[id]/page.tsx new file mode 100644 index 0000000..3aac99e --- /dev/null +++ b/app/(order)/review/[id]/page.tsx @@ -0,0 +1,8 @@ +export default function ReviewPage({ params: _params }: { params: Promise<{ id: string }> }) { + return ( +
+

评价

+

对本次服务进行评价

+
+ ) +} diff --git a/app/layout.tsx b/app/layout.tsx index 41c0ab4..496eb2d 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,6 @@ import type { Metadata } from "next" import { Geist, Geist_Mono } from "next/font/google" +import { Providers } from "./providers" import "./globals.css" const geistSans = Geist({ @@ -13,8 +14,8 @@ const geistMono = Geist_Mono({ }) export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "聚玩", + description: "游戏陪玩服务平台", } export default function RootLayout({ @@ -23,8 +24,10 @@ export default function RootLayout({ children: React.ReactNode }>) { return ( - - {children} + + + {children} + ) } diff --git a/app/page.tsx b/app/page.tsx deleted file mode 100644 index fcc63c4..0000000 --- a/app/page.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import Image from "next/image" - -export default function Home() { - return ( -
-
- Next.js logo -
-

- To get started, edit the page.tsx file. -

-

- Looking for a starting point or more instructions? Head over to{" "} - - Templates - {" "} - or the{" "} - - Learning - {" "} - center. -

-
-
- - Vercel logomark - Deploy Now - - - Documentation - -
-
-
- ) -} diff --git a/app/providers.tsx b/app/providers.tsx new file mode 100644 index 0000000..23363f8 --- /dev/null +++ b/app/providers.tsx @@ -0,0 +1,20 @@ +"use client" + +import { QueryClient, QueryClientProvider } from "@tanstack/react-query" +import { useState } from "react" + +export function Providers({ children }: { children: React.ReactNode }) { + const [queryClient] = useState( + () => + new QueryClient({ + defaultOptions: { + queries: { + staleTime: 60 * 1000, + refetchOnWindowFocus: false, + }, + }, + }), + ) + + return {children} +} diff --git a/next-env.d.ts b/next-env.d.ts index 7a70f65..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts" +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/store/auth.ts b/store/auth.ts new file mode 100644 index 0000000..3765f08 --- /dev/null +++ b/store/auth.ts @@ -0,0 +1,19 @@ +import { create } from "zustand" + +export type UserRole = "consumer" | "player" | "owner" + +interface AuthState { + isAuthenticated: boolean + currentRole: UserRole + switchRole: (role: UserRole) => void + login: () => void + logout: () => void +} + +export const useAuthStore = create((set) => ({ + isAuthenticated: false, + currentRole: "consumer", + switchRole: (role) => set({ currentRole: role }), + login: () => set({ isAuthenticated: true }), + logout: () => set({ isAuthenticated: false, currentRole: "consumer" }), +}))