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