feat: 分类数据统一

This commit is contained in:
R524809
2026-04-23 10:54:22 +08:00
parent 2a1dbad164
commit b2ab123b4f
15 changed files with 757 additions and 221 deletions
+4 -9
View File
@@ -1,3 +1,4 @@
import { CATEGORY_LIST_WITH_ALL } from '../../core/data/categories';
import { AGE_BANDS } from '../../core/data/difficulty';
export type HomeDisplayItem = {
@@ -43,15 +44,9 @@ export type HomeDisplayDataset = {
sections: HomeDisplaySection[];
};
const HOME_CATEGORY_TABS = [
{ id: 'all', name: '全部' },
{ id: 'math', name: '数感启蒙' },
{ id: 'pinyin', name: '汉语拼音' },
{ id: 'puzzle', name: '益智游戏' },
{ id: 'chinese', name: '趣味识字' },
{ id: 'english', name: '英语启蒙' },
{ id: 'craft', name: '创意手工' },
] as const;
const HOME_CATEGORY_TABS: HomeDisplayDataset['categoryTabs'] = CATEGORY_LIST_WITH_ALL.map(
({ id, name }) => ({ id, name }),
);
const HOME_AGE_BANDS = AGE_BANDS.map((item, index) => ({
key: item.key,