From 7fcc64f6e329c4ff4c2216389bf95ec7f2d0b970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E6=96=B0=E9=9B=A8?= Date: Wed, 25 Feb 2026 17:13:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9B=B4=E6=96=B0=E6=8A=80=E6=9C=AF?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=BD=91=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app/api/v1/legal.py | 61 ++++++++++++++++++++++++++++++++++++++ spec_kit/overview.md | 1 + 2 files changed, 62 insertions(+) diff --git a/server/app/api/v1/legal.py b/server/app/api/v1/legal.py index 08ef3ed..0a16e2c 100644 --- a/server/app/api/v1/legal.py +++ b/server/app/api/v1/legal.py @@ -14,6 +14,53 @@ router = APIRouter(prefix="/v1/legal", tags=["legal"]) INTERNAL_SENTINEL = "__internal__" +# 技术支持页文案(EN / TC) +SUPPORT_MD = """Dear Mama | Technical Support +Last updated: February 2026 + +If you need technical support for Dear Mama, please contact us: +- Support email: leitinglan@project-c.org + +Support scope (including but not limited to): +- App installation or update issues +- App crashes, freezes, or abnormal behavior +- Notification or widget related issues +- Difficulty accessing privacy policy or terms pages + +To help us process your request faster, please include: +- Device model and OS version +- App version +- A brief issue description and occurrence time +- Screenshots or screen recording (if available) + +Service commitment: +- We generally respond within 3-5 business days +- Emergency availability may vary by holidays and local time + +--- +Dear Mama|技術支援 +最後更新日期:2026 年 2 月 + +如需 Dear Mama 的技術支援,請透過以下方式聯絡我們: +- 支援信箱:leitinglan@project-c.org + +支援範圍(包含但不限於): +- App 安裝或更新問題 +- App 閃退、卡頓或異常行為 +- 通知或小組件相關問題 +- 隱私政策或使用條款頁面無法開啟 + +為了加快處理,建議提供: +- 裝置型號與系統版本 +- App 版本號 +- 問題描述與發生時間 +- 截圖或螢幕錄影(如有) + +服務承諾: +- 一般會在 3-5 個工作日內回覆 +- 節假日或時區差異時,回覆時間可能延長 +""" + # 当前多语言仅支持 EN / TC(繁体) ResolvedLang = Literal["en", "tc"] @@ -129,3 +176,17 @@ async def get_terms_of_use(request: Request) -> HTMLResponse: page = render_as_simple_html(title=title, content=content) return HTMLResponse(content=page, headers={"Content-Language": "en" if resolved == "en" else "zh-Hant"}) + +@router.get("/support", response_class=HTMLResponse) +async def get_support_page(request: Request) -> HTMLResponse: + """ + 技术支持页面(用于 App 审核的可访问 URL)。 + """ + + accept_language = request.headers.get("accept-language") + lang = _resolve_lang(accept_language) + content, resolved = choose_content_by_lang(SUPPORT_MD, lang) + title = "Dear Mama | Technical Support" if resolved == "en" else "Dear Mama|技術支援" + page = render_as_simple_html(title=title, content=content) + return HTMLResponse(content=page, headers={"Content-Language": "en" if resolved == "en" else "zh-Hant"}) + diff --git a/spec_kit/overview.md b/spec_kit/overview.md index 47ab100..f8e9649 100644 --- a/spec_kit/overview.md +++ b/spec_kit/overview.md @@ -202,6 +202,7 @@ - 后端新增内置协议内容页: - `GET /v1/legal/privacy` - `GET /v1/legal/terms` + - `GET /v1/legal/support`(技术支持页面,提供审核可用的公开支持信息) - 客户端新增协议接口封装 `client/src/services/legalApi.ts` - 客户端工程化:新增统一 HTTP 封装 `client/src/utils/http.ts`(baseURL/超时/JSON/统一错误),并将 `legalApi.ts` / `recoApi.ts` 接入 - 客户端接入两处入口:`app/(splash)/splash.tsx`、`components/home/ProfileModal.tsx`