修复(#14): 调整 USDT 提现方式枚举口径
PR Check / Lint, Check, Test and Build (push) Has been cancelled
Build and Release / Build (push) Has been cancelled

This commit is contained in:
2026-06-09 03:30:57 -07:00
parent 4d84095af2
commit 09c5216f60
2 changed files with 9 additions and 20 deletions
+2 -4
View File
@@ -44,8 +44,7 @@ const WITHDRAWAL_METHOD_MAP: Record<number, string> = {
0: "其他",
1: "支付宝",
2: "微信",
3: "银行卡",
4: "USDT(TRC20)",
3: "USDT(TRC20)",
};
const rejectSchema = z.object({
@@ -144,8 +143,7 @@ export default function WithdrawalPage() {
const methodOptions = [
{ value: "1", label: "支付宝" },
{ value: "2", label: "微信" },
{ value: "3", label: "银行卡" },
{ value: "4", label: "USDT(TRC20)" },
{ value: "3", label: "USDT(TRC20)" },
{ value: "0", label: "其他" },
];
@@ -63,8 +63,7 @@ import { useGlobalStore } from "@/stores/global";
const WITHDRAWAL_METHODS = [
{ value: 1, label: "支付宝" },
{ value: 2, label: "微信" },
{ value: 3, label: "银行卡" },
{ value: 4, label: "USDT(TRC20)" },
{ value: 3, label: "USDT(TRC20)" },
{ value: 0, label: "其他" },
] as const;
@@ -158,14 +157,11 @@ const withdrawalFormSchema = z
path: ["qr_code_url"],
});
}
} else if (data.method === 3 || data.method === 4) {
} else if (data.method === 3) {
if (!data.account) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message:
data.method === 4
? "USDT(TRC20) 地址为必填"
: "银行卡收款账号为必填",
message: "USDT(TRC20) 地址为必填",
path: ["account"],
});
}
@@ -466,9 +462,7 @@ export default function Affiliate() {
/>
)}
{(watchedMethod === 3 ||
watchedMethod === 4 ||
watchedMethod === 0) && (
{(watchedMethod === 3 || watchedMethod === 0) && (
<FormField
control={withdrawalForm.control}
name="account"
@@ -476,8 +470,7 @@ export default function Affiliate() {
<FormItem>
<FormLabel>
{(watchedMethod === 3 ||
watchedMethod === 4) && (
{watchedMethod === 3 && (
<span className="ml-1 text-destructive">
*
</span>
@@ -486,11 +479,9 @@ export default function Affiliate() {
<FormControl>
<Input
placeholder={
watchedMethod === 4
watchedMethod === 3
? "请输入 USDT(TRC20) 收款地址"
: watchedMethod === 3
? "请输入银行卡号或账户信息"
: "请输入收款账号(与备注至少填一项)"
: "请输入收款账号(与备注至少填一项)"
}
{...field}
/>