fix(distribution-admin): 全面优化大盘、对账单、钱包与前台商城的列宽排版、中文化与防换行体验

This commit is contained in:
yml2213
2026-09-09 19:47:11 +08:00
parent 4098f8f50f
commit 1c16f26ae0
5 changed files with 183 additions and 26 deletions
+19 -3
View File
@@ -35,6 +35,22 @@ import {
type PublicDistributionListing,
} from '../api'
function formatGameName(gameName?: string): string {
if (!gameName) return ''
const lower = gameName.toLowerCase().trim()
if (
lower === 'delta_force' ||
lower === 'deltaforce' ||
lower === 'delta' ||
lower.includes('delta_force') ||
lower.includes('delta') ||
gameName.includes('三角洲')
) {
return '三角洲'
}
return gameName
}
export default function Storefront() {
const { siteCode = 'demo' } = useParams<{ siteCode: string }>()
const [loading, setLoading] = useState(true)
@@ -247,7 +263,7 @@ export default function Storefront() {
buttonStyle="solid"
>
<Radio.Button value="all">全部游戏</Radio.Button>
<Radio.Button value="delta_force">三角洲行动</Radio.Button>
<Radio.Button value="delta_force">三角洲</Radio.Button>
<Radio.Button value="honor_of_kings">王者荣耀</Radio.Button>
</Radio.Group>
@@ -345,7 +361,7 @@ export default function Storefront() {
{/* 标签属性 */}
<Space wrap size={4} style={{ marginBottom: 12 }}>
<Tag color="blue" style={{ margin: 0 }}>
{item.game_name === 'delta_force' ? '三角洲行动' : item.game_name}
{formatGameName(item.game_name)}
</Tag>
{item.server_region && (
<Tag style={{ margin: 0, background: 'rgba(255,255,255,0.06)', color: '#cbd5e1', border: 'none' }}>
@@ -446,7 +462,7 @@ export default function Storefront() {
<Descriptions column={2} bordered size="small">
<Descriptions.Item label="所属游戏">
{selectedListing.game_name === 'delta_force' ? '三角洲行动' : selectedListing.game_name}
{formatGameName(selectedListing.game_name)}
</Descriptions.Item>
<Descriptions.Item label="游戏大区">{selectedListing.server_region || '全区通用'}</Descriptions.Item>
<Descriptions.Item label="登录平台">{selectedListing.login_platform || 'PC端'}</Descriptions.Item>