- 新增 /privacy-policy/delete-request 页面:提交邮箱发起删除申请 - 新增 /privacy-policy/delete-confirm 页面:从邮件链接确认删除(Suspense包裹useSearchParams) - 隐私政策页面加入删除申请入口链接
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { notFound } from "next/navigation";
|
|
import type { Metadata } from "next";
|
|
import { getSimpleContentPageBySlug } from "@/services/legal.service";
|
|
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
const page = await getSimpleContentPageBySlug("privacy-policy").catch(() => null);
|
|
return { title: page?.title ?? "隐私政策" };
|
|
}
|
|
|
|
export default async function PrivacyPolicyPage() {
|
|
const page = await getSimpleContentPageBySlug("privacy-policy").catch(() => null);
|
|
|
|
if (!page) {
|
|
notFound();
|
|
}
|
|
|
|
return (
|
|
<article className="mx-auto max-w-3xl px-6 py-24">
|
|
<h1 className="mb-8 text-4xl font-bold text-slate-900">{page.title}</h1>
|
|
{/* page.body 为 Wagtail RichTextField 渲染出的 HTML,内容仅由后台编辑人员维护,非用户输入,可信任直接渲染 */}
|
|
<div
|
|
className="space-y-4 text-slate-700 [&_h2]:mt-8 [&_h2]:text-2xl [&_h2]:font-semibold [&_h2]:text-slate-900 [&_ul]:list-disc [&_ul]:pl-6 [&_li]:mt-1"
|
|
dangerouslySetInnerHTML={{ __html: page.body }}
|
|
/>
|
|
<p className="mt-8 text-slate-700">
|
|
如需删除我们持有的您的个人信息,请
|
|
<a
|
|
href="/privacy-policy/delete-request"
|
|
className="text-primary underline"
|
|
>
|
|
点击此处申请删除
|
|
</a>
|
|
。
|
|
</p>
|
|
</article>
|
|
);
|
|
}
|