|
@@ -12,7 +12,7 @@ import { useWalletStore } from "@/stores/useWalletStore";
|
|
import { WalletEnum } from "@/types";
|
|
import { WalletEnum } from "@/types";
|
|
import { vipImages } from "@/utils/constant";
|
|
import { vipImages } from "@/utils/constant";
|
|
import { flatPoint, percentage } from "@/utils/methods";
|
|
import { flatPoint, percentage } from "@/utils/methods";
|
|
-import { ProgressBar, Toast } from "antd-mobile";
|
|
|
|
|
|
+import { ProgressBar, Toast, Badge } from "antd-mobile";
|
|
import { useTranslations } from "next-intl";
|
|
import { useTranslations } from "next-intl";
|
|
import Image from "next/image";
|
|
import Image from "next/image";
|
|
import { Fragment, useRef, useState } from "react";
|
|
import { Fragment, useRef, useState } from "react";
|
|
@@ -105,84 +105,100 @@ const WalletCard = (props: { userMoney: Wallet }) => {
|
|
{tipsStatus === WalletEnum.Replay ? <ReplayContent wallet={userMoney} /> : null}
|
|
{tipsStatus === WalletEnum.Replay ? <ReplayContent wallet={userMoney} /> : null}
|
|
</TipsModal>
|
|
</TipsModal>
|
|
<div className="coin">
|
|
<div className="coin">
|
|
- <span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
|
<div className={"coin_right_wallet"}>
|
|
<div className={"coin_right_wallet"}>
|
|
<div
|
|
<div
|
|
className={"wallet_left_border"}
|
|
className={"wallet_left_border"}
|
|
onClick={() => modalHandler(WalletEnum.Balance)}
|
|
onClick={() => modalHandler(WalletEnum.Balance)}
|
|
>
|
|
>
|
|
- <div className={"wallet_header"}>
|
|
|
|
- <span>{t("balance")}</span>
|
|
|
|
- <Image
|
|
|
|
- className="wallet_header__icon"
|
|
|
|
- src="/img/a.png"
|
|
|
|
- alt="question"
|
|
|
|
- width={15}
|
|
|
|
- height={15}
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div className="num">
|
|
|
|
- <span className="uppercase">brl </span>
|
|
|
|
- <span>{userMoney.score || 0.0}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
|
+ <section>
|
|
|
|
+ <div className={"wallet_header"}>
|
|
|
|
+ <span>{t("balance")}</span>
|
|
|
|
+ <Image
|
|
|
|
+ className="wallet_header__icon"
|
|
|
|
+ src="/img/a.png"
|
|
|
|
+ alt="question"
|
|
|
|
+ width={15}
|
|
|
|
+ height={15}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div className="num">
|
|
|
|
+ <span className="uppercase">brl </span>
|
|
|
|
+ <span>{userMoney.score || 0.0}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
className={"wallet_right_content"}
|
|
className={"wallet_right_content"}
|
|
onClick={() => modalHandler(WalletEnum.Bonus)}
|
|
onClick={() => modalHandler(WalletEnum.Bonus)}
|
|
>
|
|
>
|
|
- <div className={"wallet_header"}>
|
|
|
|
- {t("bonus")}
|
|
|
|
- <Image
|
|
|
|
- className="wallet_header__icon"
|
|
|
|
- src="/img/a.png"
|
|
|
|
- alt="question"
|
|
|
|
- width={15}
|
|
|
|
- height={15}
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- <div className="num">
|
|
|
|
- <span className="uppercase">brl </span>
|
|
|
|
- <span>{userMoney.point || 0.0}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <Badge content={percentage(userMoney.current_point_rollover, userMoney.target_point_rollover) < 100 ? null : Badge.dot} style={{right: "10px"}}>
|
|
|
|
+ <span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
|
+ </Badge>
|
|
|
|
+ <section>
|
|
|
|
+ <div className={"wallet_header"}>
|
|
|
|
+ {t("bonus")}
|
|
|
|
+ <Image
|
|
|
|
+ className="wallet_header__icon"
|
|
|
|
+ src="/img/a.png"
|
|
|
|
+ alt="question"
|
|
|
|
+ width={15}
|
|
|
|
+ height={15}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div className="num">
|
|
|
|
+ <span className="uppercase">brl </span>
|
|
|
|
+ <span>{userMoney.point || 0.0}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
className={"wallet_left_border"}
|
|
className={"wallet_left_border"}
|
|
onClick={() => modalHandler(WalletEnum.Free)}
|
|
onClick={() => modalHandler(WalletEnum.Free)}
|
|
- >
|
|
|
|
- <div className={"wallet_header"}>
|
|
|
|
- {t("free")}
|
|
|
|
- <Image
|
|
|
|
- className="wallet_header__icon"
|
|
|
|
- src="/img/a.png"
|
|
|
|
- alt="question"
|
|
|
|
- width={15}
|
|
|
|
- height={15}
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- <div className="num">
|
|
|
|
- <span className="uppercase">brl </span>
|
|
|
|
- <span>{userMoney.free_score || 0.0}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ >
|
|
|
|
+ <Badge content={percentage(userMoney.current_free_score_rollover, userMoney.target_free_score_rollover) < 100 ? null : Badge.dot} style={{right: "10px"}}>
|
|
|
|
+ <span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
|
+ </Badge>
|
|
|
|
+ <section>
|
|
|
|
+ <div className={"wallet_header"}>
|
|
|
|
+ {t("free")}
|
|
|
|
+ <Image
|
|
|
|
+ className="wallet_header__icon"
|
|
|
|
+ src="/img/a.png"
|
|
|
|
+ alt="question"
|
|
|
|
+ width={15}
|
|
|
|
+ height={15}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div className="num">
|
|
|
|
+ <span className="uppercase">brl </span>
|
|
|
|
+ <span>{userMoney.free_score || 0.0}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
className={"wallet_right_content"}
|
|
className={"wallet_right_content"}
|
|
onClick={() => modalHandler(WalletEnum.Replay)}
|
|
onClick={() => modalHandler(WalletEnum.Replay)}
|
|
>
|
|
>
|
|
- <div className={"wallet_header"}>
|
|
|
|
- {t("replay")}
|
|
|
|
- <Image
|
|
|
|
- className="wallet_header__icon"
|
|
|
|
- src="/img/a.png"
|
|
|
|
- alt="question"
|
|
|
|
- width={15}
|
|
|
|
- height={15}
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- <div className="num">
|
|
|
|
- <span className="uppercase">brl </span>
|
|
|
|
- <span>{userMoney.lose_score || 0.0}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <Badge content={percentage(userMoney.current_lose_score_rollover, userMoney.target_lose_score_rollover) < 100 ? null : Badge.dot} style={{right: "10px"}}>
|
|
|
|
+ <span className="coin_left__icon iconfont icon-qianbao3"></span>
|
|
|
|
+ </Badge>
|
|
|
|
+ <section>
|
|
|
|
+ <div className={"wallet_header"}>
|
|
|
|
+ {t("replay")}
|
|
|
|
+ <Image
|
|
|
|
+ className="wallet_header__icon"
|
|
|
|
+ src="/img/a.png"
|
|
|
|
+ alt="question"
|
|
|
|
+ width={15}
|
|
|
|
+ height={15}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div className="num">
|
|
|
|
+ <span className="uppercase">brl </span>
|
|
|
|
+ <span>{userMoney.lose_score || 0.0}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|