feat: 实现减脂体重管理App完整功能
- 实现拍照识别食物功能(集成大语言模型视觉能力) - 实现智能对话功能(集成大语言模型流式输出) - 实现食物记录和卡路里管理功能 - 实现体重记录和统计功能 - 实现健康数据管理页面 - 配置数据库表结构(用户、食物记录、体重记录) - 实现Express后端API路由 - 配置Tab导航和前端页面 - 采用健康运动配色方案
This commit is contained in:
58
client/app/(tabs)/_layout.tsx
Normal file
58
client/app/(tabs)/_layout.tsx
Normal file
@@ -0,0 +1,58 @@
|
||||
import { Tabs } from 'expo-router';
|
||||
import { Platform } from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { FontAwesome6 } from '@expo/vector-icons';
|
||||
import { useTheme } from '@/hooks/useTheme';
|
||||
|
||||
export default function TabLayout() {
|
||||
const { theme, isDark } = useTheme();
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
return (
|
||||
<Tabs
|
||||
screenOptions={{
|
||||
headerShown: false,
|
||||
tabBarStyle: {
|
||||
backgroundColor: theme.backgroundDefault,
|
||||
borderTopColor: theme.border,
|
||||
height: Platform.OS === 'web' ? 60 : 50 + insets.bottom,
|
||||
paddingBottom: Platform.OS === 'web' ? 0 : insets.bottom,
|
||||
},
|
||||
tabBarActiveTintColor: theme.primary,
|
||||
tabBarInactiveTintColor: theme.textMuted,
|
||||
tabBarItemStyle: {
|
||||
height: Platform.OS === 'web' ? 60 : undefined,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen
|
||||
name="index"
|
||||
options={{
|
||||
title: '首页',
|
||||
tabBarIcon: ({ color }) => <FontAwesome6 name="house" size={20} color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="record"
|
||||
options={{
|
||||
title: '记录',
|
||||
tabBarIcon: ({ color }) => <FontAwesome6 name="camera" size={20} color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="stats"
|
||||
options={{
|
||||
title: '统计',
|
||||
tabBarIcon: ({ color }) => <FontAwesome6 name="chart-line" size={20} color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="chat"
|
||||
options={{
|
||||
title: 'AI助手',
|
||||
tabBarIcon: ({ color }) => <FontAwesome6 name="robot" size={20} color={color} />,
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user