Skip to content

Let's use AI to Earn!

余额问题

daoyian8b6b1cc7ae5c
diff --git a/src/views/finance/userWalletRecord.tsx b/src/views/finance/userWalletRecord.tsx
index fd42eb2f..904d22f9 100644
--- a/src/views/finance/userWalletRecord.tsx
+++ b/src/views/finance/userWalletRecord.tsx
@@ -70,6 +70,17 @@ export default function Page() {
amount: number;
walletAccountId: string;
}) => {
+ // if (values.amount > walletAccountList.balance) {
+ // message.error('提现金额必须大于0');
+ // return;
+ // }
+
+ const res = await financeApi.getUserWalletInfo();
+ if (res.balance < values.amount) {
+ message.error('提现金额必须小于等于当前余额');
+ return;
+ }
+
try {
await financeApi.addUserWalletRecord({
walletAccountId: values.walletAccountId,