修复(#14): 调整 USDT 提现方式枚举口径
This commit is contained in:
@@ -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,10 +479,8 @@ export default function Affiliate() {
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder={
|
||||
watchedMethod === 4
|
||||
watchedMethod === 3
|
||||
? "请输入 USDT(TRC20) 收款地址"
|
||||
: watchedMethod === 3
|
||||
? "请输入银行卡号或账户信息"
|
||||
: "请输入收款账号(与备注至少填一项)"
|
||||
}
|
||||
{...field}
|
||||
|
||||
Reference in New Issue
Block a user