Browse Source

refactor(enterprise): 企业端主色统一为 primary,我的页接入设置入口,统一菜单话术

master
doublex001 2 months ago
parent
commit
ab7cc7102e
  1. 6
      app/(enterprise)/_layout.tsx
  2. 8
      app/(enterprise)/enterprise-overview.tsx
  3. 2
      src/api/api.ts

6
app/(enterprise)/_layout.tsx

@ -11,7 +11,7 @@ export const unstable_settings = {
initialRouteName: 'job-management',
};
/** 企业端用 success(绿) 区分求职端 primary(蓝);未选中 -outline,选中填充实心 */
/** 企业端底部 Tab 与求职端共用品牌主色 primary;未选中 -outline,选中填充实心 */
const ICON_MAP = {
'enterprise-overview': { outline: 'person-outline', filled: 'person' },
'job-management': { outline: 'folder-outline', filled: 'folder' },
@ -80,7 +80,7 @@ function TabItem({
<Ionicons name={outline} size={22} color={colors.textHint} />
</Animated.View>
<Animated.View style={[StyleSheet.absoluteFill, styles.center, { opacity: progress }]}>
<Ionicons name={filled} size={22} color={colors.success} />
<Ionicons name={filled} size={22} color={colors.primary} />
</Animated.View>
</View>
</Animated.View>
@ -203,6 +203,6 @@ const styles = StyleSheet.create({
},
tabLabelActive: {
fontWeight: '600',
color: colors.success,
color: colors.primary,
},
});

8
app/(enterprise)/enterprise-overview.tsx

@ -24,15 +24,15 @@ const COLOR_TOKENS: Record<string, string> = {
/* ===================== 子组件:顶部导航 ===================== */
function Header({ onBack }: { onBack: () => void }) {
function Header({ onBack, onSettings }: { onBack: () => void; onSettings: () => void }) {
return (
<View style={styles.header}>
<Pressable style={styles.headerBtn} onPress={onBack} hitSlop={8}>
<Ionicons name="chevron-back" size={24} color={colors.textInverse} />
</Pressable>
<Text style={styles.headerTitle}>我的</Text>
<Pressable style={styles.headerBtn} hitSlop={8}>
<Ionicons name="ellipsis-horizontal" size={22} color={colors.textInverse} />
<Pressable style={styles.headerBtn} onPress={onSettings} hitSlop={8}>
<Ionicons name="settings-outline" size={22} color={colors.textInverse} />
</Pressable>
</View>
);
@ -188,7 +188,7 @@ export default function EnterpriseOverviewScreen() {
<View style={styles.container}>
<LinearGradient colors={headerGradient} style={styles.gradientHeader}>
<SafeAreaView edges={['top']}>
<Header onBack={() => router.back()} />
<Header onBack={() => router.back()} onSettings={() => router.push('/settings')} />
<CompanyCard overview={overview} />
</SafeAreaView>
</LinearGradient>

2
src/api/api.ts

@ -626,7 +626,7 @@ const MOCK_MENU_ITEMS: MenuItem[] = [
{ id: 'progress', title: '求职进度', icon: 'list-outline', route: '/progress' },
{ id: 'game', title: '通关小游戏', icon: 'trophy-outline', route: '/game' },
{ id: 'legal', title: '阿布阿诺法律服务', icon: 'shield-checkmark-outline', route: '/legal' },
{ id: 'enterprise-overview', title: '企业数据总览', icon: 'business-outline', route: '/enterprise-overview' },
{ id: 'enterprise-overview', title: '企业主页', icon: 'business-outline', route: '/enterprise-overview' },
{ id: 'job-publish', title: '发布岗位', icon: 'add-circle-outline', route: '/job-publish' },
{ id: 'job-evaluations', title: '岗位评价管理', icon: 'chatbubbles-outline', route: '/job-evaluations' },
{ id: 'candidate-detail', title: '候选人详情', icon: 'person-outline', route: '/candidate-detail' },

Loading…
Cancel
Save