diff --git a/apps/admin/src/main.tsx b/apps/admin/src/main.tsx index 935dca3..c54432e 100644 --- a/apps/admin/src/main.tsx +++ b/apps/admin/src/main.tsx @@ -3,7 +3,7 @@ import { createRoot } from "react-dom/client"; import { QueryClient, QueryClientProvider, useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { App, Button, Card, Form, Input, Layout, Menu, Select, Space, Typography, message, Table, Tag, Popconfirm, Modal } from "antd"; import { ApiClient } from "@personal-brand/api-client"; -import type { BrandProfile, TrustContent, TrustContentInput } from "@personal-brand/api-client"; +import type { BrandProfile, PublicService, TrustContent, TrustContentInput } from "@personal-brand/api-client"; import "antd/dist/reset.css"; const apiBaseUrl = "http://localhost:3001"; @@ -35,7 +35,16 @@ function TrustContentPage() { return open()}>新增内容}>{value} }, { title: "标题", dataIndex: "title" }, { title: "状态", dataIndex: "isPublished", render: (value) => value ? "已发布" : "草稿" }, { title: "操作", render: (_: unknown, item: TrustContent) => remove.mutate(item.id)}> }]} /> { setModalOpen(false); setEditing(null); form.resetFields(); }} onOk={() => form.submit()} confirmLoading={save.isPending}>
{ save.mutate(values); setModalOpen(false); }}>
{value} }, { title: "价格展示", dataIndex: "priceText" }, { title: "状态", dataIndex: "isEnabled", render: (value) => value ? "已上架" : "已下架" }, { title: "操作", render: (_: unknown, item: PublicService) => }]} /> { setModalOpen(false); setEditing(null); form.resetFields(); }} onOk={() => form.submit()} confirmLoading={save.isPending}> save.mutate(values)}>; +} + +function Dashboard() { const [page, setPage] = useState("brand"); return 个人品牌 setPage(key)} items={[{ key: "brand", label: "品牌信任" }, { key: "trust", label: "信任内容" }, { key: "services", label: "服务与合作" }, { key: "inquiries", label: "咨询记录" }]} />品牌管理后台{page === "brand" ? : page === "trust" ? : page === "services" ? : 该模块正在接入通用配置接口。}; } function Root() { const [loggedIn, setLoggedIn] = useState(Boolean(localStorage.getItem("adminToken"))); return loggedIn ? : setLoggedIn(true)} />; } createRoot(document.getElementById("app")!).render();