/** * 拼图碎片数据配置 * 存储每个碎片的标题、场景图片等数据 */ export interface PuzzlePieceData { /** 碎片标题 */ title: string /** 对应的场景图片路径(相对于 puzzle/ 目录) */ detailImage: string // 对应的场景路由 route: string } /** * 每个故居的拼图碎片数据配置(每个故居碎片都是16块) * 格式:{ residence: { pieceId: PuzzlePieceData } } */ export const puzzleDataConfig: Record> = { chenyun: { // 碎片1 - 示例数据,请根据实际情况修改 1: { title: '水乡少年·艰率成长', detailImage: 'chenyun/details/1', route: 'place1', }, // 碎片2 2: { title: '陈云就读 青浦县立乙种商业学校', detailImage: 'chenyun/details/2', route: 'place2', }, // 碎片3 3: { title: '陈云就读颜安小学', detailImage: 'chenyun/details/3', route: 'place2', }, // 碎片4 4: { title: '陈云在 上海商务印书馆当学徒', detailImage: 'chenyun/details/4', route: 'place3', }, // 碎片5 5: { title: '陈云加入中国共产党', detailImage: 'chenyun/details/5', route: 'place3', }, // 碎片6 6: { title: '陈云被选为 中央政治局委员、常委', detailImage: 'chenyun/details/6', route: 'place4', }, // 碎片7 7: { title: '陈云任 西北财经办事处副主任', detailImage: 'chenyun/details/7', route: 'place5', }, // 碎片8 8: { title: '陈云主持 陕甘宁边区财政工作', detailImage: 'chenyun/details/8', route: 'place5', }, // 碎片9 9: { title: '恢复时期·经济奠基', detailImage: 'chenyun/details/9', route: 'place6', }, // 碎片10 10: { title: '银元之战', detailImage: 'chenyun/details/10', route: 'place7', }, // 碎片11 11: { title: '陈云起草的关于发展国民 经济"一五"计划报告的手稿', detailImage: 'chenyun/details/11', route: 'place8', }, // 碎片12 12: { title: '陈云赴宝钢考察', detailImage: 'chenyun/details/12', route: 'place9', }, // 碎片13 13: { title: '体悟·银元之战', detailImage: 'chenyun/details/13', route: 'reflection', }, // 碎片14 14: { title: '体悟·米棉之战', detailImage: 'chenyun/details/14', route: 'reflection', }, // 碎片15 15: { title: '陈云经济思想的核心内容', detailImage: 'chenyun/details/15', route: 'internalization', }, // 碎片16 16: { title: '陈云精神', detailImage: 'chenyun/details/16', route: 'internalization', }, }, huangyanpei: { // 碎片1 1: { title: '杰出的爱国民主人士黄炎培', detailImage: 'huangyanpei/details/1', route: 'place1', }, // 碎片2 2: { title: '南洋公学', detailImage: 'huangyanpei/details/2', route: 'place2', }, // 碎片3 3: { title: '川沙小学堂', detailImage: 'huangyanpei/details/3', route: 'place3', }, // 碎片4 4: { title: '开群女学课堂', detailImage: 'huangyanpei/details/4', route: 'place3', }, // 碎片5 5: { title: '杨斯盛创建浦东中学', detailImage: 'huangyanpei/details/5', route: 'place3', }, // 碎片6 6: { title: '中华职业教育 和中华职业学校', detailImage: 'huangyanpei/details/6', route: 'place4', }, // 碎片7 7: { title: '中华职业教育社会址', detailImage: 'huangyanpei/details/7', route: 'place4', }, // 碎片8 8: { title: '抗敌后援会成立大会', detailImage: 'huangyanpei/details/8', route: 'place4', }, // 碎片9 9: { title: '中华职校组织义勇军', detailImage: 'huangyanpei/details/9', route: 'place4', }, // 碎片10 10: { title: '黄炎培与荣氏兄弟 合作工人教育', detailImage: 'huangyanpei/details/10', route: 'place4', }, // 碎片11 11: { title: '黄炎培创建民盟', detailImage: 'huangyanpei/details/11', route: 'place5', }, // 碎片12 12: { title: '窑洞对话', detailImage: 'huangyanpei/details/12', route: 'place5', }, // 碎片13 13: { title: '黄炎培参加第一届全国人大', detailImage: 'huangyanpei/details/13', route: 'place6', }, // 碎片14 14: { title: '黄炎培对浦东中学新生的教导', detailImage: 'huangyanpei/details/14', route: 'reflection2', }, // 碎片15 15: { title: '中华职业学校的立业之本', detailImage: 'huangyanpei/details/15', route: 'reflection4', }, // 碎片16 16: { title: '黄炎培的”实业救国“情怀”', detailImage: 'huangyanpei/details/16', route: 'internalization', }, }, sunzhongshan: { 1: { title: '革命四杰', detailImage: 'sunzhongshan/details/1', route: 'place1', }, 2: { title: '郑观应的推荐信郑观应的推荐信', detailImage: 'sunzhongshan/details/2', route: 'place1', }, 3: { title: '《申报》刊登孙中山就职 临时大总统消息', detailImage: 'sunzhongshan/details/3', route: 'place1', }, 4: { title: '《民立报》报道孙中山解职', detailImage: 'sunzhongshan/details/4', route: 'place1', }, 5: { title: '中国铁路计划图', detailImage: 'sunzhongshan/details/5', route: 'place2', }, 6: { title: '实业计划', detailImage: 'sunzhongshan/details/6', route: 'place2', }, 7: { title: '护法运动', detailImage: 'sunzhongshan/details/7', route: 'place2', }, 8: { title: '社会主义的精义', detailImage: 'sunzhongshan/details/8', route: 'place3', }, 9: { title: '李大钊给胡适的信', detailImage: 'sunzhongshan/details/9', route: 'place3', }, 10: { title: '《中国国民党第一次全国代表大会宣言》', detailImage: 'sunzhongshan/details/10', route: 'place3', }, 11: { title: '国事遗嘱', detailImage: 'sunzhongshan/details/11', route: 'place4', }, 12: { title: '第二次护法运动推理小游戏', detailImage: 'sunzhongshan/details/12', route: 'reflection1', }, 13: { title: '国共合作推理小游戏', detailImage: 'sunzhongshan/details/13', route: 'reflection2', }, 14: { title: '抱病北上推理小游戏', detailImage: 'sunzhongshan/details/14', route: 'reflection3', }, 15: { title: '振兴中华对新时代青年的意义', detailImage: 'sunzhongshan/details/15', route: 'internalization', }, 16: { title: '学习孙中山的精神', detailImage: 'sunzhongshan/details/16', route: 'internalization', }, }, luxun: { 1: { title: '鲁迅1927年南下广州时的照片', detailImage: 'luxun/details/1', route: 'place1', }, 2: { title: '景云里旧居场景图', detailImage: 'luxun/details/2', route: 'place1', }, 3: { title: '《且介亭杂文》', detailImage: 'luxun/details/3', route: 'place2', }, 4: { title: '《中国人失掉自信力了吗》', detailImage: 'luxun/details/4', route: 'place2', }, 5: { title: '《南腔北调集》', detailImage: 'luxun/details/5', route: 'place2', }, 6: { title: '《故事新编》', detailImage: 'luxun/details/6', route: 'place3', }, 7: { title: '《理水》手迹', detailImage: 'luxun/details/7', route: 'place3', }, 8: { title: '书架上的翻译著作', detailImage: 'luxun/details/8', route: 'place3', }, 9: { title: '《海上述林》书册', detailImage: 'luxun/details/9', route: 'place3', }, 10: { title: '书册上的校订批注', detailImage: 'luxun/details/10', route: 'place3', }, 11: { title: '瞿秋白对鲁迅的评价', detailImage: 'luxun/details/11', route: 'place4', }, 12: { title: '鲁迅赠瞿秋白的对联', detailImage: 'luxun/details/12', route: 'place4', }, 13: { title: '冯雪峰与鲁迅谈话的资料图', detailImage: 'luxun/details/13', route: 'place4', }, 14: { title: '鲁迅创作历程', detailImage: 'luxun/details/14', route: 'reflection1', }, 15: { title: '鲁迅精神的总结', detailImage: 'luxun/details/15', route: 'reflection3', }, 16: { title: '鲁迅在木刻上对青年的培养', detailImage: 'luxun/details/16', route: 'internalization', }, }, // 后续可以添加其他故居的数据 // sunzhongshan: { ... }, } /** * 获取碎片的数据配置 * @param residence 故居名称 * @param pieceId 碎片ID * @returns 碎片数据,如果不存在则返回默认值 */ export const getPuzzlePieceData = (residence: string, pieceId: number): PuzzlePieceData | null => { const residenceConfig = puzzleDataConfig[residence] const pieceData = residenceConfig?.[pieceId] return pieceData || null }