/** * 模型展示区 - 4 张模型卡片(USD 单价)+ 汇率提示 */ import Link from 'next/link'; import { useLocale, useTranslations } from 'next-intl'; import { FxPrice } from './FxPrice'; type ModelCard = { id: string; nameKey: string; shortKey: string; tagKey: string; tagClass: string; usdIn: number; usdOut: number; }; const tagStyles = { purple: 'text-brand-purple-l bg-[rgba(124,92,255,.12)] border-[rgba(124,92,255,.35)]', green: 'text-brand-green-l bg-[rgba(0,229,160,.1)] border-[rgba(0,229,160,.3)]', gold: 'text-brand-gold bg-[rgba(255,194,77,.1)] border-[rgba(255,194,77,.3)]', gray: 'text-brand-muted bg-[rgba(154,163,192,.1)] border-[rgba(154,163,192,.3)]', } as const; const models: ModelCard[] = [ { id: 'glm-5.2', nameKey: 'glm_name', shortKey: 'glm_short', tagKey: 'tag_flagship', tagClass: tagStyles.purple, usdIn: 0.98, usdOut: 3.08 }, { id: 'deepseek-v4', nameKey: 'dsv4_name', shortKey: 'dsv4_short', tagKey: 'tag_best', tagClass: tagStyles.green, usdIn: 0.14, usdOut: 0.28 }, { id: 'deepseek-v4-pro', nameKey: 'dsv4p_name', shortKey: 'dsv4p_short', tagKey: 'tag_reasoning', tagClass: tagStyles.gold, usdIn: 0.3, usdOut: 0.6 }, { id: 'qwen-max', nameKey: 'qwen_name', shortKey: 'qwen_short', tagKey: 'tag_enterprise', tagClass: tagStyles.gray, usdIn: 1.96, usdOut: 7.84 }, ]; export function ModelsSection() { const t = useTranslations('models'); const locale = useLocale(); return (
{t('kicker')}

{t('h2')}

{t('p')}

{t('more')}
{models.map((m) => (
{t(m.nameKey)} {t(m.tagKey)}

{t(m.shortKey)}

{t('price_in')}{' '}
{t('price_out')}{' '}
{t('see_detail')}
))}
{t('rate_note')}
); }