feat: 更新多个组件以优化用户体验和功能
- 在 CoachScreen 中移除不必要的 router 引入,简化代码结构 - 在 PersonalScreen 中移除未使用的 colorScheme 引入,优化组件性能 - 更新 NutritionRadarCard 组件,新增卡路里计算功能,提升营养数据展示 - 修改 Statistics 组件,调整样式以增强视觉效果 - 移除 iOS 项目中的多余健康数据权限设置,简化配置
This commit is contained in:
@@ -352,6 +352,14 @@ export default function ExploreScreen() {
|
||||
{/* 营养摄入雷达图卡片 */}
|
||||
<NutritionRadarCard
|
||||
nutritionSummary={nutritionSummary}
|
||||
burnedCalories={basalMetabolism || 0}
|
||||
calorieDeficit={0}
|
||||
resetToken={animToken}
|
||||
onMealPress={(mealType: 'breakfast' | 'lunch' | 'dinner' | 'snack') => {
|
||||
console.log('选择餐次:', mealType);
|
||||
// 这里可以导航到营养记录页面
|
||||
pushIfAuthedElseLogin('/nutrition/records');
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* 真正瀑布流布局 */}
|
||||
@@ -720,13 +728,11 @@ const styles = StyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
marginBottom: 16,
|
||||
},
|
||||
healthMetricsContainer: {
|
||||
marginBottom: 16,
|
||||
},
|
||||
masonryContainer: {
|
||||
marginBottom: 16,
|
||||
flexDirection: 'row',
|
||||
gap: 12,
|
||||
marginTop: 16,
|
||||
},
|
||||
masonryColumn: {
|
||||
flex: 1,
|
||||
|
||||
Reference in New Issue
Block a user