feat: 手机验证码调试

This commit is contained in:
zdl
2025-10-16 10:09:15 +08:00
parent 8ce9268e76
commit 7c166f7186
9 changed files with 212 additions and 108 deletions

View File

@@ -36,22 +36,10 @@ const ProtectedRoute = ({ children }) => {
);
}
// 未登录时显示占位符(弹窗会自动打开
// 未登录时,渲染子组件 + 自动打开弹窗(通过 useEffect
// 弹窗会在 useEffect 中自动触发,页面正常显示
if (!isAuthenticated || !user) {
return (
<Box
height="100vh"
display="flex"
alignItems="center"
justifyContent="center"
bg="gray.50"
>
<VStack spacing={4}>
<Spinner size="xl" color="blue.500" thickness="4px" />
<Text fontSize="lg" color="gray.600">请先登录...</Text>
</VStack>
</Box>
);
return children;
}
// 已登录,渲染子组件