feat: 手动充值、邀请码注册与后台管理增强
新增玩家手动充值全流程(收款方式配置、充值下单/审核、钱包上分), 支持邀请码注册、邀请历史与专属返水率;完善后台代理/玩家管理与响应式操作栏, 并补充前台注册、充值页及多语言错误码。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,8 +16,38 @@ export const TX_KEY_MAP: Record<string, string> = {
|
||||
RESETTLE_REVERSE: 'finance.tx.resettle',
|
||||
DEPOSIT: 'finance.tx.deposit',
|
||||
WITHDRAW: 'finance.tx.withdraw',
|
||||
PLAYER_DEPOSIT: 'finance.tx.deposit',
|
||||
};
|
||||
|
||||
export function walletTxTypeKey(type: string): string {
|
||||
return TX_KEY_MAP[type.toUpperCase()] ?? '';
|
||||
}
|
||||
|
||||
export const DEPOSIT_RECHARGE_TYPES = new Set([
|
||||
'MANUAL_DEPOSIT',
|
||||
'DEPOSIT',
|
||||
'PLAYER_DEPOSIT',
|
||||
]);
|
||||
|
||||
export const DEPOSIT_METHOD_KEY_MAP: Record<string, string> = {
|
||||
MANUAL_ADMIN: 'finance.deposit_method.manual_admin',
|
||||
MANUAL_AGENT: 'finance.deposit_method.manual_agent',
|
||||
MANUAL: 'finance.deposit_method.manual',
|
||||
};
|
||||
|
||||
export function walletDepositMethodLabel(
|
||||
row: {
|
||||
transactionType: string;
|
||||
depositMethodKey?: string | null;
|
||||
depositMethodName?: string | null;
|
||||
},
|
||||
t: (key: string) => string,
|
||||
): string {
|
||||
if (!DEPOSIT_RECHARGE_TYPES.has(row.transactionType.toUpperCase())) return '—';
|
||||
if (row.depositMethodName?.trim()) return row.depositMethodName.trim();
|
||||
if (row.depositMethodKey) {
|
||||
const key = DEPOSIT_METHOD_KEY_MAP[row.depositMethodKey];
|
||||
return key ? t(key) : row.depositMethodKey;
|
||||
}
|
||||
return '—';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user