feat(client): i18n copy + reco lang refresh + home polish

This commit is contained in:
1
2026-02-02 20:11:09 +08:00
parent 64b8352ad3
commit 996999453a
19 changed files with 594 additions and 188 deletions

View File

@@ -35,13 +35,14 @@ function withTimeout(ms: number): AbortController {
export async function fetchRecoFeed(req: RecoRequest): Promise<RecoEngineResult> {
const controller = withTimeout(12_000);
const url = `${API_BASE_URL}/v1/reco/feed`;
const acceptLanguage = i18n.language?.toLowerCase().startsWith('zh') ? 'tc' : 'en';
const res = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
// 让后端做 locale 选择(目前后端只区分 en/tc
'Accept-Language': i18n.language || 'en',
'Accept-Language': acceptLanguage,
},
body: JSON.stringify({
k: req.k,