fix(distribution-admin): 全面优化全站表格列宽、单号防折行、平台与状态中文化体验

This commit is contained in:
yml2213
2026-09-09 19:57:06 +08:00
parent 1c16f26ae0
commit 423672e47b
10 changed files with 292 additions and 57 deletions
+24 -2
View File
@@ -48,9 +48,31 @@ function formatGameName(gameName?: string): string {
) {
return '三角洲'
}
if (lower.includes('honor') || gameName.includes('王者')) {
return '王者荣耀'
}
if (lower.includes('genshin') || gameName.includes('原神')) {
return '原神'
}
if (lower.includes('cs') || lower.includes('csgo')) {
return 'CS2'
}
return gameName
}
function formatLoginPlatform(platform?: string): string {
if (!platform) return ''
const lower = platform.toLowerCase().trim()
if (lower === 'qq') return 'QQ'
if (lower === 'wechat' || lower === 'wx') return '微信'
if (lower === 'steam') return 'Steam'
if (lower === 'epic') return 'Epic'
if (lower === 'wegame') return 'WeGame'
if (lower === 'mobile') return '手游端'
if (lower === 'pc') return 'PC端'
return platform
}
export default function Storefront() {
const { siteCode = 'demo' } = useParams<{ siteCode: string }>()
const [loading, setLoading] = useState(true)
@@ -370,7 +392,7 @@ export default function Storefront() {
)}
{item.login_platform && (
<Tag style={{ margin: 0, background: 'rgba(255,255,255,0.06)', color: '#cbd5e1', border: 'none' }}>
{item.login_platform}
{formatLoginPlatform(item.login_platform)}
</Tag>
)}
{item.rank_level && (
@@ -465,7 +487,7 @@ export default function Storefront() {
{formatGameName(selectedListing.game_name)}
</Descriptions.Item>
<Descriptions.Item label="游戏大区">{selectedListing.server_region || '全区通用'}</Descriptions.Item>
<Descriptions.Item label="登录平台">{selectedListing.login_platform || 'PC端'}</Descriptions.Item>
<Descriptions.Item label="登录平台">{formatLoginPlatform(selectedListing.login_platform) || 'PC端'}</Descriptions.Item>
<Descriptions.Item label="段位天梯">{selectedListing.rank_level || '暂未定级'}</Descriptions.Item>
<Descriptions.Item label="哈夫币资产">
{selectedListing.haf_coin_amount > 0