fix: unify chinese language code as zh-CN

This commit is contained in:
TerryM
2026-05-26 10:03:12 +08:00
parent f2e97c329e
commit f482a2ec38
13 changed files with 53 additions and 50 deletions

View File

@@ -33,7 +33,7 @@ type Post = {
id: string;
categoryId: number;
categorySlug: string;
language: string; // "zh" | "en" | "ja" | "ko" | "vi" | "id" | "ms"
language: string; // "zh-CN" | "en" | "ja" | "ko" | "vi" | "id" | "ms"
text?: string; // 可选,纯文本/图说;前端做 https → 链接自动识别
attachments: Attachment[]; // 0~Ntext-only post 时为 []
isRecommended: boolean;
@@ -72,7 +72,7 @@ Query 参数:
| `lang` | 是 | UI 语言;后端可据此选择不同语言版本的 `text` |
| `category` | 否 | category slug不传 = 全部分类 |
| `type` | 否 | `all` / `image` / `video` / `pdf` / `ppt` / `text` / `link` / `archive`;语义见 §3 |
| `language` | 否 | 资源语言:`zh` / `en` / `ja` / `ko` / `vi` / `id` / `ms` |
| `language` | 否 | 资源语言:`zh-CN` / `en` / `ja` / `ko` / `vi` / `id` / `ms` |
| `cursor` | 否 | 上一次返回的 `nextCursor`;不传 = 第一页 |
| `limit` | 否 | 默认 20最大 50 |