feat(front-end): 初始化STP前端工程并提交页面框架

引入前端项目基础结构、页面骨架和UI组件,建立可运行的开发与构建配置,方便后续按模块迭代。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-22 14:25:22 +08:00
parent f6ff2e3625
commit 7f0f79420c
107 changed files with 18103 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
import { useNavigate, Link } from "react-router";
import { Hexagon, ArrowLeft, CheckCircle2 } from "lucide-react";
import { toast } from "sonner";
import { Button } from "../components/ui/button";
const fields = [
{ label: "企业全称", placeholder: "请输入营业执照上的企业全称", col: 2 },
{ label: "统一社会信用代码", placeholder: "18 位信用代码" },
{ label: "企业类型", placeholder: "如:有限责任公司" },
{ label: "法定代表人", placeholder: "请输入法人姓名" },
{ label: "注册资本(万元)", placeholder: "请输入注册资本" },
{ label: "联系人", placeholder: "请输入联系人姓名" },
{ label: "联系电话", placeholder: "请输入手机号码" },
{ label: "电子邮箱", placeholder: "用于接收平台通知" },
{ label: "经营类别", placeholder: "如:自动化控制 / 环保工程" },
{ label: "企业地址", placeholder: "请输入详细注册地址", col: 2 },
];
export function RegisterPage() {
const navigate = useNavigate();
return (
<div className="min-h-screen bg-slate-50">
<header className="flex h-16 items-center justify-between border-b bg-card px-8">
<div className="flex items-center gap-2">
<Hexagon className="size-6 text-primary" />
<span className="font-semibold"> · </span>
</div>
<Link to="/" className="flex items-center gap-1 text-sm text-muted-foreground hover:text-primary">
<ArrowLeft className="size-4" />
</Link>
</header>
<div className="mx-auto max-w-3xl px-6 py-10">
<div className="mb-6">
<h1 className="text-foreground"></h1>
<p className="mt-1 text-sm text-muted-foreground">
1-3
</p>
</div>
<div className="rounded-xl border bg-card p-8">
<h3 className="mb-5 text-foreground"></h3>
<form
className="grid grid-cols-2 gap-5"
onSubmit={(e) => {
e.preventDefault();
toast.success("注册申请已提交,平台正在进行资质审核");
setTimeout(() => navigate("/"), 1200);
}}
>
{fields.map((f) => (
<div key={f.label} className={f.col === 2 ? "col-span-2" : ""}>
<label className="mb-1.5 block text-sm">{f.label}</label>
<input
className="h-10 w-full rounded-lg border bg-input-background px-3 text-sm outline-none focus:border-primary"
placeholder={f.placeholder}
/>
</div>
))}
<div className="col-span-2">
<label className="mb-1.5 block text-sm"> / </label>
<div className="flex h-28 cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed border-border bg-muted/30 text-sm text-muted-foreground hover:border-primary">
<CheckCircle2 className="mb-2 size-6 text-muted-foreground/60" />
PDF / JPG / PNG
</div>
</div>
<div className="col-span-2 mt-2 flex items-center gap-3">
<Button type="submit" className="h-11 flex-1">
</Button>
<Button type="button" variant="outline" className="h-11" onClick={() => navigate("/")}>
</Button>
</div>
</form>
</div>
</div>
</div>
);
}