refactor(HomePage): 暂时禁用已登录跳转个人中心逻辑

This commit is contained in:
zdl
2026-01-15 17:49:19 +08:00
parent e110d5860c
commit 6cf9dca324

View File

@@ -16,7 +16,7 @@ import { FeaturedFeatureCard } from './components/FeaturedFeatureCard';
import { FeatureCard } from './components/FeatureCard';
import MiniProgramLauncher from '@/components/MiniProgramLauncher';
import { isMobileDevice } from '@/components/MiniProgramLauncher/hooks/useWechatEnvironment';
import Center from '@views/Center';
// [暂时禁用] import Center from '@views/Center';
import '@/styles/home-animations.css';
/**
@@ -89,64 +89,57 @@ const HomePage: React.FC = () => {
return null;
}
// 已登录直接渲染个人中心
if (isAuthenticated && user) {
return <Center />;
}
// [暂时禁用] 已登录直接渲染个人中心(未来可能恢复)
// if (isAuthenticated && user) {
// return <Center />;
// }
// 未登录渲染首页内容
return (
<Box minH="100%">
{/* Hero Section - 深色科技风格,自适应容器高度 */}
<Box
position="relative"
minH="100%"
bg="linear-gradient(135deg, #0E0C15 0%, #15131D 50%, #252134 100%)"
overflow="hidden"
>
<Container maxW="7xl" position="relative" px={containerPx}>
<VStack
spacing={{ base: 5, md: 8, lg: 10 }}
align="stretch"
py={{ base: 8, md: 10, lg: 12 }}
justify="center"
>
{/* 主标题区域 */}
<HeroHeader
headingSize={headingSize}
headingLetterSpacing={headingLetterSpacing}
heroTextSize={heroTextSize}
/>
<Container maxW="7xl" position="relative" px={containerPx}>
<VStack
spacing={{ base: 5, md: 8, lg: 10 }}
align="stretch"
py={{ base: 8, md: 10, lg: 12 }}
justify="center"
>
{/* 主标题区域 */}
<HeroHeader
headingSize={headingSize}
headingLetterSpacing={headingLetterSpacing}
heroTextSize={heroTextSize}
/>
{/* 核心功能面板 */}
<Box pb={{ base: 5, md: 8 }}>
<VStack spacing={{ base: 4, md: 5 }}>
{/* 特色功能卡片 - 新闻中心 */}
<FeaturedFeatureCard
feature={featuredFeature}
onClick={handleFeatureClick}
/>
{/* 核心功能面板 */}
<Box pb={{ base: 5, md: 8 }}>
<VStack spacing={{ base: 4, md: 5 }}>
{/* 特色功能卡片 - 新闻中心 */}
<FeaturedFeatureCard
feature={featuredFeature}
onClick={handleFeatureClick}
/>
{/* 其他功能卡片 */}
<SimpleGrid
columns={{ base: 1, md: 2, lg: 3 }}
spacing={{ base: 2, md: 3, lg: 4 }}
w="100%"
>
{regularFeatures.map((feature) => (
<FeatureCard
key={feature.id}
feature={feature}
onClick={handleFeatureClick}
/>
))}
</SimpleGrid>
</VStack>
</Box>
</VStack>
</Container>
</Box>
{/* 其他功能卡片 */}
<SimpleGrid
columns={{ base: 1, md: 2, lg: 3 }}
spacing={{ base: 2, md: 3, lg: 4 }}
w="100%"
>
{regularFeatures.map((feature) => (
<FeatureCard
key={feature.id}
feature={feature}
onClick={handleFeatureClick}
/>
))}
</SimpleGrid>
</VStack>
</Box>
</VStack>
</Container>
{/* 移动端右上角固定按钮 - 小程序入口 */}
{isMobile && (