|
@@ -1,5 +1,5 @@
|
|
|
"use client";
|
|
|
-import { UserInfoRep, UserVipInfo, Wallet, checkCodeApi } from "@/api/user";
|
|
|
+import { UserInfoRep, UserVipInfo, Wallet, getUserTransferApi } from "@/api/user";
|
|
|
import {
|
|
|
BalanceContent,
|
|
|
BonusContent,
|
|
@@ -83,19 +83,18 @@ const WalletCard = (props: { userMoney: Wallet }) => {
|
|
|
};
|
|
|
|
|
|
// 彩金、免费币、重玩币提现到钱包操作
|
|
|
- const handleAcquire = async () => {
|
|
|
- tipsRef.current?.onClose();
|
|
|
- // checkCodeApi({ code: "123", mobile: "18215519037" })
|
|
|
- // .then((res) => {
|
|
|
- // if (res.code === 200) {
|
|
|
- // Toast.show("领取成功!")
|
|
|
- // setTimeout(() => {
|
|
|
- // tipsRef.current?.onClose();
|
|
|
- // }, 1000)
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // Toast.show("领取失败!");
|
|
|
- // })
|
|
|
+ const handleAcquire = async (wallet_type: number) => {
|
|
|
+ getUserTransferApi({ wallet_type })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ Toast.show("领取成功!")
|
|
|
+ setTimeout(() => {
|
|
|
+ tipsRef.current?.onClose();
|
|
|
+ }, 1000)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Toast.show("领取失败!");
|
|
|
+ })
|
|
|
// .catch((error) => {
|
|
|
// Toast.show("领取失败!");
|
|
|
// });
|
|
@@ -151,7 +150,7 @@ const WalletCard = (props: { userMoney: Wallet }) => {
|
|
|
className={"wallet_right_content"}
|
|
|
onClick={() => modalHandler(WalletEnum.Bonus)}
|
|
|
>
|
|
|
- <Badge content={percentage(userMoney.current_point_rollover, userMoney.target_point_rollover) < 100 ? null : Badge.dot} style={{right: "10px"}}>
|
|
|
+ <Badge content={userMoney.is_point_transfer ? Badge.dot : null} style={{right: "10px"}}>
|
|
|
<span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
</Badge>
|
|
|
<section>
|
|
@@ -175,7 +174,7 @@ const WalletCard = (props: { userMoney: Wallet }) => {
|
|
|
className={"wallet_left_border"}
|
|
|
onClick={() => modalHandler(WalletEnum.Free)}
|
|
|
>
|
|
|
- <Badge content={percentage(userMoney.current_free_score_rollover, userMoney.target_free_score_rollover) < 100 ? null : Badge.dot} style={{right: "10px"}}>
|
|
|
+ <Badge content={userMoney.is_free_transfer ? Badge.dot : null} style={{right: "10px"}}>
|
|
|
<span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
</Badge>
|
|
|
<section>
|
|
@@ -199,7 +198,7 @@ const WalletCard = (props: { userMoney: Wallet }) => {
|
|
|
className={"wallet_right_content"}
|
|
|
onClick={() => modalHandler(WalletEnum.Replay)}
|
|
|
>
|
|
|
- <Badge content={percentage(userMoney.current_lose_score_rollover, userMoney.target_lose_score_rollover) < 100 ? null : Badge.dot} style={{right: "10px"}}>
|
|
|
+ <Badge content={userMoney.is_lose_transfer ? Badge.dot : null} style={{right: "10px"}}>
|
|
|
<span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
</Badge>
|
|
|
<section>
|