From 84f70d3fb97a47317a873dad90f8da8b532adadb Mon Sep 17 00:00:00 2001 From: "WIN-UGQIHHLSKBB\\EDY" <1790703832@qq.com> Date: Tue, 2 Jun 2026 11:16:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E5=8D=8F=E8=AE=AE=20?= =?UTF-8?q?=E9=9A=90=E7=A7=81=E6=94=BF=E7=AD=96=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/index.ts | 2 ++ src/dialog/LoginRegisterModal/index.tsx | 8 +++--- src/dialog/points-recharge/index.tsx | 5 ++-- src/layouts/Layout/Layout.tsx | 2 +- src/pages/content/privacy-policy/index.tsx | 33 ++++++++++++++++++++++ src/pages/content/user-terms/index.tsx | 33 ++++++++++++++++++++++ src/router/index.tsx | 18 ++++++++++++ 7 files changed, 94 insertions(+), 7 deletions(-) create mode 100644 src/pages/content/privacy-policy/index.tsx create mode 100644 src/pages/content/user-terms/index.tsx diff --git a/src/constants/index.ts b/src/constants/index.ts index d5bb8b4..3c77dcc 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -18,6 +18,8 @@ export const ROUTES = { LEGAL: "/legal", CONTENT: "/content", CONTENT_PAGE: "/content/page", + CONTENT_PRIVACY_POLICY: "/content/privacy-policy", + CONTENT_USER_TERMS: "/content/user-terms", NOT_FOUND: "/404", } as const; diff --git a/src/dialog/LoginRegisterModal/index.tsx b/src/dialog/LoginRegisterModal/index.tsx index a0abd1c..17592dc 100644 --- a/src/dialog/LoginRegisterModal/index.tsx +++ b/src/dialog/LoginRegisterModal/index.tsx @@ -523,11 +523,11 @@ export function LoginRegisterModal({ onClose, onSelect }: LoginRegisterModalProp
{t("auth.agreement_sub1")} - + 《{t("app.user_terms")}》 {t("auth.agreement_sub2")} - + 《{t("app.privacy_policy")}》
@@ -571,11 +571,11 @@ export function LoginRegisterModal({ onClose, onSelect }: LoginRegisterModalProp > {t("auth.agreement_sub1")} - + 《{t("app.user_terms")}》 {t("auth.agreement_sub2")} - + 《{t("app.privacy_policy")}》 {t("auth.agreement_sub3")} diff --git a/src/dialog/points-recharge/index.tsx b/src/dialog/points-recharge/index.tsx index 7284ee0..f0c45f3 100644 --- a/src/dialog/points-recharge/index.tsx +++ b/src/dialog/points-recharge/index.tsx @@ -1,6 +1,7 @@ import { Message } from "@arco-design/web-react"; import { useCallback, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; +import { ROUTES } from "@/constants"; import { getParamConfig, getPointPackageList } from "@/api/api"; import { useUserStore } from "@/store/useUserStore"; import { useCopyText } from "@/hooks/useCopyText"; @@ -134,7 +135,7 @@ export default function PointsRecharge({ title }: PointsRechargeProps) { {t("points_recharge.tip_middle")} @@ -143,7 +144,7 @@ export default function PointsRecharge({ title }: PointsRechargeProps) { {t("auth.agreement_sub2")} diff --git a/src/layouts/Layout/Layout.tsx b/src/layouts/Layout/Layout.tsx index f740173..53e760d 100644 --- a/src/layouts/Layout/Layout.tsx +++ b/src/layouts/Layout/Layout.tsx @@ -231,7 +231,7 @@ export function Layout({ children }: LayoutProps) { /** 角色创建页:侧栏固定收起且不可展开 */ const isCharactersCreateRoute = pathname === ROUTES.CHARACTERS_CREATE; - const shouldShowFloatingComposer = pathname !== ROUTES.SUBSCRIBE && pathname !== ROUTES.CHARACTERS_CREATE; + const shouldShowFloatingComposer = pathname !== ROUTES.SUBSCRIBE && pathname !== ROUTES.CHARACTERS_CREATE && pathname !== ROUTES.CONTENT_USER_TERMS && pathname !== ROUTES.CONTENT_PRIVACY_POLICY; const effectiveSidebarCollapsed = isCharactersCreateRoute || sidebarCollapsed; diff --git a/src/pages/content/privacy-policy/index.tsx b/src/pages/content/privacy-policy/index.tsx new file mode 100644 index 0000000..b359187 --- /dev/null +++ b/src/pages/content/privacy-policy/index.tsx @@ -0,0 +1,33 @@ +import { getPrivacyPolicy } from "@/api/api"; +import { useEffect, useState } from "react"; +import "../page/index.scss"; + +export default function PrivacyPolicy() { + const [html, setHtml] = useState