|
@@ -50,7 +50,7 @@ const Withdraw = () => {
|
|
|
const scoreRef = React.useRef<ModalProps>(null);
|
|
|
const gameModelRef = React.useRef<ModalProps>(null);
|
|
|
const game = React.useRef<GameListRep | null>(null);
|
|
|
- const successModelRef = React.useRef<ModalProps | null>(null);
|
|
|
+ const pointModelRef = React.useRef<ModalProps | null>(null);
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
getData();
|
|
@@ -232,6 +232,12 @@ const Withdraw = () => {
|
|
|
Toast.show("Quantidade insuficiente disponível para retirada");
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ if (wallet.point > 0) {
|
|
|
+ pointModelRef.current?.onOpen();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
// 如果有未完成游戏
|
|
|
if (data.play_list && data.play_list.length > 0) {
|
|
|
game.current = data.play_list[0];
|
|
@@ -269,10 +275,10 @@ const Withdraw = () => {
|
|
|
Toast.show(t(`code.${error.data.code}`));
|
|
|
}
|
|
|
};
|
|
|
- // const goGame = () => {
|
|
|
- // const current = game.current;
|
|
|
- // getGameUrl(current!, { id: current?.id + "" });
|
|
|
- // };
|
|
|
+ const goGame = () => {
|
|
|
+ const current = game.current;
|
|
|
+ getGameUrl(current!, { id: current?.id + "" });
|
|
|
+ };
|
|
|
|
|
|
// const doCleanBonus = async () => {
|
|
|
// try {
|
|
@@ -635,7 +641,7 @@ const Withdraw = () => {
|
|
|
</TipsModal>
|
|
|
|
|
|
{/* 提现拦截 */}
|
|
|
- {/* <TipsModal
|
|
|
+ <TipsModal
|
|
|
title={
|
|
|
<div className="text-left">
|
|
|
<div className="text-[.12rem] text-[#fff]">
|
|
@@ -683,8 +689,8 @@ const Withdraw = () => {
|
|
|
Para jogos
|
|
|
</Button>
|
|
|
</div>
|
|
|
- </TipsModal>*/}
|
|
|
- {/* <TipsModal
|
|
|
+ </TipsModal>
|
|
|
+ <TipsModal
|
|
|
title={
|
|
|
<div className="text-left">
|
|
|
<div className="text-[.16rem] text-[#11de68]">Saque bem-sucedida.</div>
|
|
@@ -693,8 +699,7 @@ const Withdraw = () => {
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|
|
|
- visible={true}
|
|
|
- ref={successModelRef}
|
|
|
+ ref={pointModelRef}
|
|
|
getContainer={document?.querySelector("#app")}
|
|
|
className={styles.gameModal}
|
|
|
>
|
|
@@ -726,7 +731,7 @@ const Withdraw = () => {
|
|
|
"--border-color": "#ebc71f",
|
|
|
"--text-color": "#12171a",
|
|
|
}}
|
|
|
- onClick={() => successModelRef.current?.onClose()}
|
|
|
+ onClick={() => pointModelRef.current?.onClose()}
|
|
|
>
|
|
|
Cancelar
|
|
|
</Button>
|
|
@@ -738,11 +743,15 @@ const Withdraw = () => {
|
|
|
"--border-color": "#11de68",
|
|
|
"--text-color": "#12171a",
|
|
|
}}
|
|
|
+ onClick={async () => {
|
|
|
+ pointModelRef.current?.onClose();
|
|
|
+ await extractHandler();
|
|
|
+ }}
|
|
|
>
|
|
|
confirmação
|
|
|
</Button>
|
|
|
</div>
|
|
|
- </TipsModal> */}
|
|
|
+ </TipsModal>
|
|
|
</div>
|
|
|
);
|
|
|
};
|