feat: 添加 BMI 计算和训练计划排课功能

- 新增 BMI 计算工具,支持用户输入体重和身高计算 BMI 值,并根据结果提供分类和建议
- 在训练计划中集成排课功能,允许用户选择和安排训练动作
- 更新个人信息页面,添加出生日期字段,支持用户完善个人资料
- 优化训练计划卡片样式,提升用户体验
- 更新相关依赖,确保项目兼容性和功能完整性
This commit is contained in:
richarjiang
2025-08-15 10:45:37 +08:00
parent 807e185761
commit f95401c1ce
14 changed files with 3309 additions and 374 deletions

View File

@@ -1,4 +1,5 @@
import { AnimatedNumber } from '@/components/AnimatedNumber';
import { BMICard } from '@/components/BMICard';
import { CircularRing } from '@/components/CircularRing';
import { ProgressBar } from '@/components/ProgressBar';
import { Colors } from '@/constants/Colors';
@@ -27,6 +28,7 @@ export default function ExploreScreen() {
const theme = (useColorScheme() ?? 'light') as 'light' | 'dark';
const colorTokens = Colors[theme];
const stepGoal = useAppSelector((s) => s.user.profile?.dailyStepsGoal) ?? 2000;
const userProfile = useAppSelector((s) => s.user.profile);
// 使用 dayjs当月日期与默认选中“今天”
const days = getMonthDaysZh();
const [selectedIndex, setSelectedIndex] = useState(getTodayIndexInMonth());
@@ -225,6 +227,12 @@ export default function ExploreScreen() {
</View>
</View>
</View>
{/* BMI 指数卡片 */}
<BMICard
weight={userProfile?.weight}
height={userProfile?.height}
/>
</ScrollView>
</SafeAreaView>
</View>