feat: 移除不再使用的配置文件和更新组件,提升代码整洁性
- 删除 .claude/settings.local.json 配置文件,清理不必要的代码。 - 更新多个组件以引入音频资源,增强用户互动体验。 - 调整引导对话文本,确保信息准确性和一致性。 - 更新图像资源,提升视觉内容的准确性和一致性。
This commit is contained in:
1 parent
cf64e7ec50
commit
8ba36a4a1a
132 files changed
+546
-454
No files matched your search
@@ -1,45 +0,0 @@
|
||||
/**
|
||||
* 展品与拼图碎片映射配置
|
||||
* 定义每个展品对应解锁的碎片ID
|
||||
*
|
||||
* 格式:{ residence: { exhibitId: pieceId } }
|
||||
* 示例:chenyun: { 1: 1 } 表示陈云故居的展品1对应碎片1
|
||||
*/
|
||||
|
||||
export const puzzleExhibitMapping: Record<
|
||||
string,
|
||||
Record<number, number>
|
||||
> = {
|
||||
chenyun: {
|
||||
// 展品1 对应 碎片1
|
||||
1: 1,
|
||||
// 展品2 对应 碎片2
|
||||
2: 2,
|
||||
// 后续可以继续添加其他展品的映射
|
||||
// 3: 3,
|
||||
// 4: 4,
|
||||
},
|
||||
// 后续可以添加其他故居的映射
|
||||
// sunzhongshan: {
|
||||
// 1: 1,
|
||||
// },
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取展品对应的碎片ID
|
||||
* @param residence 故居名称
|
||||
* @param exhibitId 展品ID
|
||||
* @returns 碎片ID,如果不存在则返回 null
|
||||
*/
|
||||
export const getPuzzlePieceByExhibit = (
|
||||
residence: string,
|
||||
exhibitId: number
|
||||
): number | null => {
|
||||
const residenceMapping = puzzleExhibitMapping[residence];
|
||||
if (!residenceMapping) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return residenceMapping[exhibitId] ?? null;
|
||||
};
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* 拼图碎片与页面路由映射配置
|
||||
* 格式:故居名 -> 碎片ID -> 路由路径(相对于/:moduleName/)
|
||||
*
|
||||
* 示例:
|
||||
* - 碎片1 对应 place1 页面
|
||||
* - 碎片2 对应 place2 页面
|
||||
* - 碎片3 对应 reflection 页面
|
||||
* - 碎片4 对应 internalization 页面
|
||||
*
|
||||
* 注意:路由路径中的 :moduleName 会在使用时替换为实际的 moduleName
|
||||
*/
|
||||
export const puzzleMapping: Record<string, Record<number, string>> = {
|
||||
chenyun: {
|
||||
// 示例:碎片1 对应 place1 页面
|
||||
1: "chenyun/place1",
|
||||
// 后续可以继续添加其他碎片的映射
|
||||
// 2: "chenyun/place2",
|
||||
// 3: "chenyun/reflection",
|
||||
// 4: "chenyun/internalization",
|
||||
},
|
||||
// 后续可以添加其他故居的映射
|
||||
// sunzhongshan: {
|
||||
// 1: "sunzhongshan/place1",
|
||||
// },
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取碎片对应的路由路径
|
||||
* @param residence 故居名称
|
||||
* @param pieceId 碎片ID
|
||||
* @param moduleName 模块名称(用于替换路由中的 :moduleName)
|
||||
* @returns 完整的路由路径,如果不存在则返回 null
|
||||
*/
|
||||
export const getPuzzleRoute = (
|
||||
residence: string,
|
||||
pieceId: number,
|
||||
moduleName: string
|
||||
): string | null => {
|
||||
const residenceMapping = puzzleMapping[residence];
|
||||
if (!residenceMapping) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const route = residenceMapping[pieceId];
|
||||
if (!route) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return `/${moduleName}/${route}`;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user