docs: change TypeScript to JavaScript in frontend types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
zheng020 2026-04-13 19:14:29 +08:00
parent 4e2e867c06
commit 8284999b3a

View File

@ -619,7 +619,7 @@ function loadStarbookData() {
| 星册主页 | `/pages/starbook/index` | 不变 |
| 查看更多 | `/pages/starbook/items?type=regular&category=castlove&grade=5` | 新页面,接分页数据 |
### 8.4 数据结构(前端 TypeScript 类型
### 8.4 数据结构(前端 JavaScript
```ts
interface StarbookHomeData {
@ -655,7 +655,7 @@ interface AssetItem {
}
// grade 中文转换函数(前端使用)
function toChineseGrade(grade: number): string {
function toChineseGrade(grade) {
const map = { 1: '一', 2: '二', 3: '三', 4: '四', 5: '五' };
return `等级${map[grade] || grade}`;
}