feat: 开户备注、账单展示优化与后台代理管理增强

- 新增初始上分备注(日常上分/开户赠金/自定义)及前后台校验与展示

- 优化钱包流水类型与备注显示,区分管理员/代理/玩家上下分

- 修复登录后语言被后端覆盖的问题,登录时同步当前语言到服务端

- 后台代理/玩家表格操作栏重构,充值订单增加备注列

- 前台个人中心、充值、账单与验证码组件体验优化

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-11 17:23:58 +08:00
parent 10485ecfaf
commit 03e72ca9b2
46 changed files with 3721 additions and 1059 deletions

View File

@@ -1,6 +1,11 @@
export const TX_KEY_MAP: Record<string, string> = {
MANUAL_DEPOSIT: 'wallet.tx_deposit',
ADMIN_DEPOSIT: 'wallet.tx_admin_deposit',
AGENT_DEPOSIT: 'wallet.tx_agent_deposit',
INITIAL_DEPOSIT: 'wallet.tx_admin_deposit',
MANUAL_WITHDRAW: 'wallet.tx_withdraw',
ADMIN_WITHDRAW: 'wallet.tx_admin_withdraw',
AGENT_WITHDRAW: 'wallet.tx_agent_withdraw',
MANUAL_ADJUST: 'wallet.tx_adjust',
BET_FREEZE: 'wallet.tx_bet_freeze',
BET_DEDUCT: 'wallet.tx_bet_deduct',
@@ -16,13 +21,36 @@ export const TX_KEY_MAP: Record<string, string> = {
RESETTLE_REVERSE: 'wallet.tx_resettle',
DEPOSIT: 'wallet.tx_deposit',
WITHDRAW: 'wallet.tx_withdraw',
PLAYER_DEPOSIT: 'wallet.tx_deposit',
PLAYER_DEPOSIT: 'wallet.tx_player_deposit',
};
export function txTypeKey(type: string): string {
return TX_KEY_MAP[type.toUpperCase()] ?? '';
}
export function txDisplayType(tx: { displayType?: string; transactionType: string }): string {
return tx.displayType?.trim() || tx.transactionType;
}
export function txSummaryLabel(
tx: {
summary?: string | null;
summaryKind?: 'opening_bonus' | null;
referenceType?: string | null;
},
t: (key: string, params?: Record<string, unknown>) => string,
): string {
if (tx.summaryKind === 'opening_bonus') {
return t('wallet.summary_opening_bonus');
}
const summary = tx.summary?.trim();
if (!summary) return '';
if (tx.referenceType === 'BET') {
return t('wallet.summary_bet', { betNo: summary });
}
return summary;
}
export function isDepositType(type: string): boolean {
const t = type.toUpperCase();
return (t.includes('DEPOSIT') || t === 'CASHBACK_DEPOSIT') && !isCashbackType(type);