Ver código fonte

fix: 6910 【bcwin网站】轮盘邀请活动,转到彩金1,轮盘中心没有+1的提示显示

Before 7 meses atrás
pai
commit
c65aec427d

BIN
public/slots/light-1.png


BIN
public/slots/light-2.png


+ 10 - 7
src/app/[locale]/(navbar)/withdraw/WithdrawWidget.tsx

@@ -310,13 +310,16 @@ const WithdrawWidget: FC<Props> = (props) => {
                             <li>
                                 {t("WithdrawPage.SaqueDisponivel")}{" "}
                                 <span className="tip">
-                                    {" "}
-                                    {percentage(
-                                        wallet.current_score_rollover,
-                                        wallet.target_score_rollover
-                                    ) < 100
-                                        ? 0
-                                        : wallet.score}{" "}
+                                    {flatPoint(
+                                        wallet.target_score_rollover - wallet.current_score_rollover
+                                    ) === 0
+                                        ? wallet.score
+                                        : percentage(
+                                                wallet.current_score_rollover,
+                                                wallet.target_score_rollover
+                                            ) < 100
+                                          ? 0
+                                          : wallet.score}{" "}
                                     BRL
                                 </span>
                                 <span

+ 19 - 4
src/app/[locale]/affiliate/component/TabsCom/index.tsx

@@ -1,8 +1,8 @@
 "use client";
 import { usePathname, useRouter } from "@/i18n/routing";
-import { Tabs } from "antd-mobile";
+import { Mask, Tabs } from "antd-mobile";
 import { useTranslations } from "next-intl";
-import { FC } from "react";
+import { FC, useState } from "react";
 
 interface Props {}
 const App: FC<Props> = (props) => {
@@ -12,16 +12,22 @@ const App: FC<Props> = (props) => {
 
     const activeTab = pathname.split("/").at(-1);
 
+    const [visible, setVisible] = useState(false);
+
     const tabs = [
         { id: 1, page: "summary", content: t("PAINEL"), x: 0.27 },
         { id: 2, page: "referrals", content: t("REFERÊNCIAS"), x: 0.93 },
         { id: 3, page: "report", content: t("RELATÓRIO"), x: 1.7 },
         { id: 4, page: "payments", content: t("PAGAMENTOS"), x: 2.48 },
         { id: 5, page: "faq", content: t("FAQ"), x: 3.06 },
-        // { id: 6, page: "faq", content: "TUTORIAL", x: 3.06 },
+        { id: 6, page: "", content: "TUTORIAL", x: 3.06 },
     ] as const;
     const tabsChange = (page: string) => {
-        router.replace(`/affiliate/${page}`);
+        if (page) {
+            router.replace(`/affiliate/${page}`);
+        } else {
+            setVisible(true);
+        }
     };
 
     return (
@@ -30,6 +36,7 @@ const App: FC<Props> = (props) => {
         >
             <Tabs
                 onChange={tabsChange}
+                stretch={false}
                 style={{
                     "--active-line-color": "#ff6a01",
                     "--active-title-color": "#ff6a01",
@@ -47,6 +54,14 @@ const App: FC<Props> = (props) => {
                     );
                 })}
             </Tabs>
+            <Mask visible={visible}>
+                <div
+                    className={"flex items-center justify-between p-[0.1389rem]" + " bg-[#17181c]"}
+                >
+                    <p>Regras de cálculo de comissão</p>
+                    <i className={"iconfont icon-guanbi"} onClick={() => setVisible(false)}></i>
+                </div>
+            </Mask>
         </div>
     );
 };

+ 4 - 1
src/components/Box/WheelModal.tsx

@@ -170,6 +170,7 @@ export const WheelClient: FC<WheelProps> = (props) => {
 
     const router = useRouter();
 
+    const [isWin, setIsWin] = useState(false);
     const [buttonText, setButtonText] = useState<number>(0); // 0 -> false 1:true
 
     // 当前中奖
@@ -212,9 +213,11 @@ export const WheelClient: FC<WheelProps> = (props) => {
         activeRef.current!.style.display = "block";
 
         if (currentWin.current.amount > 0) {
+            setIsWin(true);
             setButtonText(currentWin.current.amount);
         } else {
             setButtonText(currentWheel.can || 0);
+            setIsWin(false);
         }
 
         setTimeout(() => {
@@ -336,7 +339,7 @@ export const WheelClient: FC<WheelProps> = (props) => {
                                     }
                                 >
                                     <p className={"-mt-[0.2778rem] h-[0.22rem]"}>
-                                        {buttonText > 0 && buttonText !== 1 ? "+" : ""}
+                                        {buttonText > 0 && isWin ? "+" : ""}
                                     </p>
                                     <NumberFlow value={buttonText} />
                                 </div>

+ 2 - 0
src/components/Box/index.tsx

@@ -85,6 +85,8 @@ const Box: FC<PropsWithChildren<Props>> = (props) => {
             case ModalEnum.pwa_install:
                 pwaModalRef.current?.onOpen();
                 break;
+            case ModalEnum.carousel_wheel:
+                break;
             default:
                 Toast.show("Unknown parameters");
         }

+ 1 - 0
src/components/Box/types.ts

@@ -4,4 +4,5 @@
 export enum ModalEnum {
     red_packet = "red_packet",
     pwa_install = "pwa_install",
+    carousel_wheel = "carousel_wheel",
 }