调整桌面首页进入创作主页

桌面端打开根路径默认进入创作主页

移动端根路径继续保持推荐首页

补充首页初始路由测试与创作主页文档说明
This commit is contained in:
2026-06-21 20:37:01 +08:00
parent 7e414ec37c
commit 47023cd9be
5 changed files with 108 additions and 16 deletions
+14
View File
@@ -101,6 +101,20 @@ export function resolveSelectionStageFromPath(
return ROUTE_STAGE_BY_PATH.get(normalizeAppPath(pathname)) ?? 'platform';
}
export function resolveInitialSelectionStageFromPath(
pathname: string,
isDesktopLayout: boolean,
): SelectionStage {
const normalizedPath = normalizeAppPath(pathname);
const selectionStage = resolveSelectionStageFromPath(pathname);
if (normalizedPath === '/' && isDesktopLayout) {
return 'creation-home';
}
return selectionStage;
}
export function resolvePathForSelectionStage(stage: SelectionStage) {
return APP_STAGE_ROUTES[stage] ?? APP_STAGE_ROUTES.platform;
}