feat: 更新标签页和新增探索页面

- 将标签页中的“首页”改为“探索”,并更新相关逻辑
- 新增探索页面,展示推荐文章和训练计划
- 优化教练页面的导航,确保用户体验一致性
- 移除不再使用的代码,简化项目结构
- 更新路由常量,确保路径管理集中化
This commit is contained in:
richarjiang
2025-08-18 19:08:22 +08:00
parent d52981ab29
commit c7d7255312
5 changed files with 20 additions and 65 deletions

View File

@@ -1,7 +1,6 @@
import { HeaderBar } from '@/components/ui/HeaderBar';
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
import { Ionicons } from '@expo/vector-icons';
import AsyncStorage from '@react-native-async-storage/async-storage';
import * as Haptics from 'expo-haptics';
import { useRouter } from 'expo-router';
@@ -305,50 +304,6 @@ export default function GoalsScreen() {
<Text style={[styles.rangeHint, { color: colors.textMuted }]}> {STEPS_RANGE.min.toLocaleString()}-{STEPS_RANGE.max.toLocaleString()} {STEPS_RANGE.step}</Text>
</SectionCard>
<SectionCard
title="练习普拉提是为了什么"
subtitle="可多选"
>
<View style={styles.grid}>
{PURPOSE_OPTIONS.map((opt) => {
const active = purposes.includes(opt.id);
return (
<TouchableOpacity
key={opt.id}
style={[
styles.optionCard,
{
backgroundColor: active ? colors.primary : colors.card,
borderColor: active ? colors.primary : colors.border,
},
]}
activeOpacity={0.9}
onPress={() => togglePurpose(opt.id)}
>
<View style={styles.optionIconWrap}>
<Ionicons
name={opt.icon}
size={20}
color={active ? colors.onPrimary : colors.text}
/>
</View>
<Text
numberOfLines={2}
style={[
styles.optionLabel,
{ color: active ? colors.onPrimary : colors.text },
]}
>
{opt.label}
</Text>
</TouchableOpacity>
);
})}
</View>
{purposes.length > 0 && (
<Text style={[styles.selectedHint, { color: colors.textSecondary }]}> {purposes.length} </Text>
)}
</SectionCard>
</ScrollView>
</SafeAreaView>
</View>