Browse Source

chore: 清理调试日志并提取霍兰德硬编码色

- 中和 app/ 下 52 处 console.* 调试日志(占位 onPress 改为 () => {},独立语句移除)
- 霍兰德 E 型 #FFB347 三处复用 colors.compareOrange,消除硬编码十六进制
- 修复移除日志后产生的未使用变量(result/url)
master
doublex001 2 months ago
parent
commit
3d808b3aab
  1. 4
      app/(tabs)/chat.tsx
  2. 2
      app/(tabs)/jobs.tsx
  3. 7
      app/(tabs)/profile.tsx
  4. 1
      app/appeal.tsx
  5. 14
      app/chat/[id].tsx
  6. 2
      app/holland-result.tsx
  7. 2
      app/holland.tsx
  8. 2
      app/holland/question.tsx
  9. 10
      app/jobs/[id].tsx
  10. 8
      app/jobs/offer-compare.tsx
  11. 4
      app/jobs/rank.tsx
  12. 3
      app/legal.tsx
  13. 7
      app/personal-data-export.tsx
  14. 3
      app/resume/export.tsx
  15. 3
      app/settings.tsx
  16. 1
      app/settings/about.tsx
  17. 2
      app/settings/account-cancel.tsx
  18. 1
      app/settings/account.tsx

4
app/(tabs)/chat.tsx

@ -98,7 +98,6 @@ function InterviewCard({ interview }: { interview: Interview }) {
<Pressable
style={styles.actionBtn}
onPress={() => {
console.log(isVideo ? '加入会议' : '导航前往', interview.id);
}}
>
<Text style={styles.actionText}>{isVideo ? '加入会议' : '导航前往'}</Text>
@ -180,7 +179,6 @@ export default function ChatScreen() {
<Pressable
style={styles.matchBanner}
onPress={() => {
console.log('查看匹配详情', matchResult.companies);
}}
>
<Text style={styles.matchBannerTitle}>
@ -211,7 +209,6 @@ export default function ChatScreen() {
<Pressable
style={styles.offerBanner}
onPress={() => {
console.log('查看 Offer 列表');
}}
>
<Text style={styles.offerTitle}>您有2个Offer待处理</Text>
@ -236,7 +233,6 @@ export default function ChatScreen() {
<Text style={styles.sectionTitle}>今日面试</Text>
<Pressable
onPress={() => {
console.log('查看全部日程');
}}
>
<Text style={styles.sectionLink}>全部日程 &gt;</Text>

2
app/(tabs)/jobs.tsx

@ -193,7 +193,6 @@ export default function JobsScreen() {
<Pressable
style={styles.navIconBtn}
onPress={() => {
console.log('[JobsScreen] 进入「评分权重设置」');
router.push('/jobs/weight-settings');
}}
hitSlop={6}
@ -265,7 +264,6 @@ export default function JobsScreen() {
<Pressable
style={styles.compareBtn}
onPress={() => {
console.log('[JobsScreen] 进入「岗位对比」');
router.push('/jobs/compare');
}}
hitSlop={6}

7
app/(tabs)/profile.tsx

@ -262,7 +262,7 @@ export default function ProfileScreen() {
<View style={styles.sectionHeader}>
<View style={styles.sectionBar} />
<Text style={[styles.sectionTitle, styles.sectionTitleGrow]}>八大维度评分</Text>
<Pressable onPress={() => console.log('评分申诉')} hitSlop={6}>
<Pressable onPress={() => {}} hitSlop={6}>
<Text style={styles.sectionLink}>评分申诉</Text>
</Pressable>
</View>
@ -276,7 +276,7 @@ export default function ProfileScreen() {
<View style={styles.sectionHeader}>
<View style={styles.sectionBar} />
<Text style={[styles.sectionTitle, styles.sectionTitleGrow]}>求职偏好</Text>
<Pressable onPress={() => console.log('编辑求职偏好')} hitSlop={6}>
<Pressable onPress={() => {}} hitSlop={6}>
<Text style={styles.sectionLink}>编辑</Text>
</Pressable>
</View>
@ -289,7 +289,7 @@ export default function ProfileScreen() {
<Pressable
key={key}
style={[styles.prefRow, isLast && styles.prefRowLast]}
onPress={() => console.log(`编辑${label}`)}
onPress={() => {}}
>
<Text style={styles.prefLabel}>{label}</Text>
{isStatus ? (
@ -334,7 +334,6 @@ export default function ProfileScreen() {
key={item.id}
style={[styles.menuRow, isLast && styles.menuRowLast]}
onPress={() => {
console.log('[ProfileScreen] 点击菜单:', item.id, item.route);
if (item.route) router.push(item.route);
}}
hitSlop={4}

1
app/appeal.tsx

@ -322,7 +322,6 @@ export default function AppealScreen() {
const handleSubmit = async () => {
const result = await submit();
if (result) {
console.log('[Appeal] submitted:', result.appealNo);
}
};

14
app/chat/[id].tsx

@ -148,7 +148,7 @@ function InterviewCard({ card }: { card: ChatCard }) {
</View>
))}
</View>
<Pressable style={styles.cardAction} onPress={() => console.log('[Chat] 查看全部预测题')}>
<Pressable style={styles.cardAction} onPress={() => {}}>
<Text style={styles.cardActionText}>{card.actionText}</Text>
<Ionicons name="chevron-forward" size={14} color={colors.primary} />
</Pressable>
@ -166,7 +166,7 @@ function SalaryCard({ card }: { card: ChatCard }) {
{card.subtitle && (
<Text style={styles.cardSubtitle}>{card.subtitle}</Text>
)}
<Pressable style={styles.cardAction} onPress={() => console.log('[Chat] 查看薪资报告')}>
<Pressable style={styles.cardAction} onPress={() => {}}>
<Text style={styles.cardActionText}>{card.actionText}</Text>
<Ionicons name="chevron-forward" size={14} color={colors.primary} />
</Pressable>
@ -266,13 +266,13 @@ function InputBar({
return (
<View style={styles.inputBar}>
<View style={styles.inputLeftActions}>
<Pressable style={styles.inputIconBtn} onPress={() => console.log('[Chat] 表情')}>
<Pressable style={styles.inputIconBtn} onPress={() => {}}>
<Ionicons name="happy-outline" size={24} color={colors.textSecondary} />
</Pressable>
<Pressable style={styles.inputIconBtn} onPress={() => console.log('[Chat] 图片')}>
<Pressable style={styles.inputIconBtn} onPress={() => {}}>
<Ionicons name="image-outline" size={24} color={colors.textSecondary} />
</Pressable>
<Pressable style={styles.inputIconBtn} onPress={() => console.log('[Chat] 文件')}>
<Pressable style={styles.inputIconBtn} onPress={() => {}}>
<Ionicons name="folder-outline" size={24} color={colors.textSecondary} />
</Pressable>
</View>
@ -288,7 +288,7 @@ function InputBar({
maxLength={500}
editable={!sending}
/>
<Pressable style={styles.plusBtn} onPress={() => console.log('[Chat] 更多')}>
<Pressable style={styles.plusBtn} onPress={() => {}}>
<Ionicons name="add" size={22} color={colors.textSecondary} />
</Pressable>
</View>
@ -356,7 +356,7 @@ export default function ChatDetailScreen() {
avatar={detail.avatar}
online={detail.online}
onBack={() => router.back()}
onMore={() => console.log('[ChatDetail] 更多操作')}
onMore={() => {}}
/>
{detail.matchInfo && (

2
app/holland-result.tsx

@ -24,7 +24,7 @@ const TYPE_COLORS: Record<string, string> = {
I: colors.info,
A: colors.action,
S: colors.success,
E: '#FFB347',
E: colors.compareOrange,
C: colors.textHint,
};

2
app/holland.tsx

@ -18,7 +18,7 @@ const TYPE_COLORS: Record<string, string> = {
I: colors.info,
A: colors.action,
S: colors.success,
E: '#FFB347',
E: colors.compareOrange,
C: colors.textHint,
};

2
app/holland/question.tsx

@ -19,7 +19,7 @@ const TYPE_COLORS: Record<string, string> = {
I: colors.info,
A: colors.action,
S: colors.success,
E: '#FFB347',
E: colors.compareOrange,
C: colors.textHint,
};

10
app/jobs/[id].tsx

@ -112,7 +112,7 @@ function Header({ onBack }: { onBack: () => void }) {
<Ionicons name="chevron-back" size={24} color={colors.textPrimary} />
</Pressable>
<Text style={styles.headerTitle}>岗位详情</Text>
<Pressable style={styles.headerBtn} onPress={() => console.log('分享')} hitSlop={8}>
<Pressable style={styles.headerBtn} onPress={() => {}} hitSlop={8}>
<Ionicons name="share-social-outline" size={22} color={colors.textPrimary} />
</Pressable>
</View>
@ -216,7 +216,7 @@ export default function JobDetailScreen() {
</View>
{/* 2. 岗位综合评分 */}
<SectionTitle title="岗位综合评分" link="评分说明" onLink={() => console.log('评分说明')} />
<SectionTitle title="岗位综合评分" link="评分说明" onLink={() => {}} />
<View style={styles.card}>
<View style={styles.scoreRow}>
<RadarChart dimensions={overallScore.dimensions} />
@ -231,14 +231,14 @@ export default function JobDetailScreen() {
<Text style={styles.scoreRank}>{overallScore.rank}</Text>
</View>
</View>
<Pressable style={styles.compareBtn} onPress={() => console.log('加入对比')} hitSlop={6}>
<Pressable style={styles.compareBtn} onPress={() => {}} hitSlop={6}>
<Ionicons name="add-circle-outline" size={16} color={colors.primary} />
<Text style={styles.compareText}>加入对比</Text>
</Pressable>
</View>
{/* 3. 真实薪资区间 */}
<SectionTitle title="真实薪资区间" link="全部" onLink={() => console.log('全部')} />
<SectionTitle title="真实薪资区间" link="全部" onLink={() => {}} />
<View style={styles.card}>
{salaryData.ranges.map((range, index) => (
<View
@ -284,7 +284,7 @@ export default function JobDetailScreen() {
value={comment}
onChangeText={setComment}
/>
<Pressable style={styles.publishBtn} onPress={() => console.log('发布', comment)}>
<Pressable style={styles.publishBtn} onPress={() => {}}>
<Text style={styles.publishText}>发布</Text>
</Pressable>
</View>

8
app/jobs/offer-compare.tsx

@ -212,7 +212,7 @@ function AISuggestionCard({ summary, detail, reportAction }: { summary: string;
</View>
<Text style={styles.aiSummary}>{summary}</Text>
<Text style={styles.aiDetail}>{detail}</Text>
<Pressable style={styles.aiReportBtn} onPress={() => console.log('查看完整分析报告')}>
<Pressable style={styles.aiReportBtn} onPress={() => {}}>
<Text style={styles.aiReportText}>{reportAction}</Text>
<Ionicons name="chevron-forward" size={14} color={colors.white} />
</Pressable>
@ -270,7 +270,7 @@ export default function OfferCompareScreen() {
{offers.map((offer) => (
<OfferCard key={offer.id} offer={offer} selected={offer.selected} />
))}
<AddOfferCard onPress={() => console.log('添加 Offer')} />
<AddOfferCard onPress={() => {}} />
</ScrollView>
{/* 综合评分对比 */}
@ -296,10 +296,10 @@ export default function OfferCompareScreen() {
{/* 底部操作栏 */}
<View style={styles.actionBar}>
<Pressable style={styles.exportBtn} onPress={() => console.log('导出对比报告')}>
<Pressable style={styles.exportBtn} onPress={() => {}}>
<Text style={styles.exportText}>{actions?.exportLabel ?? '导出对比报告'}</Text>
</Pressable>
<Pressable style={styles.acceptBtn} onPress={() => console.log('接受 Offer', actions?.acceptOfferId)}>
<Pressable style={styles.acceptBtn} onPress={() => {}}>
<Text style={styles.acceptText}>{actions?.acceptLabel ?? '接受Offer'}</Text>
</Pressable>
</View>

4
app/jobs/rank.tsx

@ -52,7 +52,7 @@ function RankSummary({ rank }: { rank: RankData }) {
<Pressable
style={styles.detailLink}
onPress={() => console.log('[RankScreen] 查看我的详细分析')}
onPress={() => {}}
hitSlop={6}
>
<Text style={styles.detailLinkText}>查看我的详细分析</Text>
@ -349,7 +349,7 @@ export default function RankScreen() {
title={tip.title}
description={tip.description}
type="action"
onAction={() => console.log('[RankScreen] 查看完整提升方案')}
onAction={() => {}}
/>
) : (
<TipItem

3
app/legal.tsx

@ -147,11 +147,8 @@ export default function LegalScreen() {
router.push('/legal/chat');
} else if (service.action === 'templates') {
// 模板在首页已展示,滚动到模板区更自然;这里简单提示
console.log('[LegalScreen] 查看文书模板');
} else if (service.action === 'faq') {
console.log('[LegalScreen] 查看常见问题');
} else if (service.action === 'upgrade') {
console.log('[LegalScreen] 开通会员');
}
};

7
app/personal-data-export.tsx

@ -226,8 +226,7 @@ export default function PersonalDataExportScreen() {
};
const handleSubmit = async () => {
const result = await submit();
console.log('[PersonalDataExport]', result.message);
await submit();
};
if (loading) {
@ -347,11 +346,11 @@ export default function PersonalDataExportScreen() {
const isLast = index === exportData.recentExports.length - 1;
return (
<View key={record.id} style={isLast ? undefined : styles.rowBorder}>
<RecentExportRow record={record} onDownload={() => console.log('下载', record.name)} />
<RecentExportRow record={record} onDownload={() => {}} />
</View>
);
})}
<Pressable style={styles.viewMoreRow} onPress={() => console.log('查看更多历史导出')}>
<Pressable style={styles.viewMoreRow} onPress={() => {}}>
<Text style={styles.viewMoreText}>查看更多历史导出</Text>
<Ionicons name="chevron-forward" size={16} color={colors.textHint} />
</Pressable>

3
app/resume/export.tsx

@ -258,8 +258,7 @@ export default function ResumeExportScreen() {
const handleExport = async () => {
if (!localSettings) return;
await handleSave();
const url = await exportFile(localSettings);
console.log('[Resume Export] url:', url);
await exportFile(localSettings);
};
if (loading) {

3
app/settings.tsx

@ -97,7 +97,6 @@ export default function SettingsScreen() {
return;
}
// 待开发项:仅占位,避免死路由
console.log(`[SettingsScreen] 待开发设置项: ${item.title}`);
};
return (
@ -135,7 +134,7 @@ export default function SettingsScreen() {
))}
{/* 退出登录 */}
<Pressable style={styles.logoutBtn} onPress={() => console.log('退出登录')}>
<Pressable style={styles.logoutBtn} onPress={() => {}}>
<Text style={styles.logoutText}>退出登录</Text>
</Pressable>
</ScrollView>

1
app/settings/about.tsx

@ -32,7 +32,6 @@ export default function AboutScreen() {
return;
}
// 协议类页面待开发:仅占位,避免死路由
console.log(`[AboutScreen] 待开发协议页: ${link.title}`);
};
return (

2
app/settings/account-cancel.tsx

@ -128,7 +128,7 @@ export default function AccountCancelScreen() {
<View style={styles.rowBody}>
<Text style={styles.rowTitle}>{item.label}</Text>
{item.actionText ? (
<Pressable onPress={() => console.log('[account-cancel] 去处理', item.id)}>
<Pressable onPress={() => {}}>
<Text style={styles.actionText}>{item.actionText}</Text>
</Pressable>
) : null}

1
app/settings/account.tsx

@ -31,7 +31,6 @@ export default function AccountSecurityScreen() {
return;
}
// 待开发项:仅占位,避免死路由
console.log(`[AccountSecurityScreen] 待开发操作: ${item.title}`);
};
return (

Loading…
Cancel
Save