diff --git a/web2/src/pages/MyProfile.tsx b/web2/src/pages/MyProfile.tsx index ba61636..f6f3910 100644 --- a/web2/src/pages/MyProfile.tsx +++ b/web2/src/pages/MyProfile.tsx @@ -341,6 +341,44 @@ const SOURCE_LABELS: Record = { manual: '用户确认', } +/** 常问话题中文映射 */ +const TOPIC_LABELS: Record = { + 'contract review': '合同审查', + 'work-life balance': '工作生活平衡', + 'tax': '税务', + 'expansion': '扩张', + 'financing': '融资', + 'labor': '劳动用工', + 'employment': '劳动用工', + 'litigation': '诉讼', + 'contract': '合同', + 'shareholder': '股东', + 'debt': '债务', + 'salary': '薪资', + 'social security': '社保', + 'work injury': '工伤', + 'termination': '辞退', + 'decision': '决策', + 'pricing': '定价', + 'hiring': '招聘', + 'layoff': '裁员', + 'partnership': '合伙', + 'investment': '投资', + 'family': '家庭', + 'health': '健康', + 'stress': '压力', + 'sleep': '睡眠', + 'parenting': '亲子', + 'education': '教育', + 'marriage': '婚姻', +} + +/** 翻译常问话题 */ +function translateTopic(topic: string): string { + const lower = topic.toLowerCase().trim() + return TOPIC_LABELS[lower] || topic +} + /** 格式化字段值 */ function formatValue(key: string, value: string): string { if (key === 'company_size') return SIZE_LABELS[value] || value @@ -427,7 +465,7 @@ export function MyProfile() {

常问话题

{(hp.common_topics as string[]).map((t, i) => ( - {String(t)} + {translateTopic(String(t))} ))}
@@ -501,7 +539,7 @@ export function MyProfile() {

常问话题

{profile.common_topics.map((t, i) => ( - {t} + {translateTopic(t)} ))}