Procházet zdrojové kódy

fix: 更新体彩主题

Before před 8 měsíci
rodič
revize
7a167cf2a0

+ 12 - 10
.env.local

@@ -1,13 +1,15 @@
+# 环境
 #baseurl
-NEXT_PUBLIC_BASE_URL=https://hk-api.tiktokjakjkl.icu
+NEXT_PUBLIC_BASE_URL=http://192.168.0.84:8800
 #share link
-NEXT_PUBLIC_SHARE_URL=https://hk-site.tiktokjakjkl.icu
+NEXT_PUBLIC_SHARE_URL=http://192.168.0.84:3000
+
 #firebase
-NEXT_PUBLIC_FIREBASE_APIKEY=AIzaSyCIE8xtySsYztsSgmQJx_aqPrrpHEuvgvw
-NEXT_PUBLIC_FIREBASE_AUTHDOMAIN=bcwin777-1bdda.firebaseapp.com
-NEXT_PUBLIC_FIREBASE_PROJECTID=bcwin777-1bdda
-NEXT_PUBLIC_FIREBASE_STORAGEBUCKET=bcwin777-1bdda.firebasestorage.app
-NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID=542456379513
-NEXT_PUBLIC_FIREBASE_APPID=1:542456379513:web:851a46fc639085170bfca8
-NEXT_PUBLIC_FIREBASE_MEASUREMENTID=G-GV6Y8DXHHD
-NEXT_PUBLIC_FIREBASE_KEYS=BOCfpA08vK6uxhMdRblnx9gPVBLx9WpTn9AutVNhHQQpVtXzDIKW0X6cmsNRaFDhyFDJfMqWjqC7mq6uDFIKU_M
+NEXT_PUBLIC_FIREBASE_APIKEY=AIzaSyDAWORGKhdyzb5KeqTi535VmD5gN2Cdle8
+NEXT_PUBLIC_FIREBASE_AUTHDOMAIN=bcwin-a99b1.firebaseapp.com
+NEXT_PUBLIC_FIREBASE_PROJECTID=bcwin-a99b1
+NEXT_PUBLIC_FIREBASE_STORAGEBUCKET=bcwin-a99b1.appspot.com
+NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID=1055413612814
+NEXT_PUBLIC_FIREBASE_APPID=1:1055413612814:web:7a563237de8e43849d275f
+NEXT_PUBLIC_FIREBASE_MEASUREMENTID=G-467M2BYJMS
+NEXT_PUBLIC_FIREBASE_KEYS=BAOsT7kii-ctLzGrgXe_wYhfuxlme1v4njnD0uPSKp3DpSnrUa2e709b9dRaeYVU7jF_qIx1y9tEv0CvilDCdnM

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "build:uat": "node scripts/swEnv.js .env.uat .env.local  && next build",
     "dev:third": "node scripts/swEnv.js .env.third .env.local  && next dev",
     "build:third": "node scripts/swEnv.js .env.third .env.local  && next build",
+    "dev:hk": "node scripts/swEnv.js .env.hk .env.local  && next dev",
     "build:hk": "node scripts/swEnv.js .env.hk .env.local  && next build",
     "start": "next start",
     "lint": "next lint",

binární
public/wheels/left-button.png


binární
public/wheels/right-button.png


binární
public/wheels/wheel.png


+ 79 - 0
src/api/cashWheel.ts

@@ -0,0 +1,79 @@
+export interface Response {
+    total: number;
+}
+
+export interface Activity {
+    /**
+     * ID 编号
+     */
+    id: number;
+    /**
+     * 活动名称
+     */
+    name: string;
+    /**
+     * 渠道管理配置
+     */
+    share_configs: ShareConfig[];
+    /**
+     * 分享渠道开关
+     */
+    share_enable: string;
+    /**
+     * 分享手机号开关
+     */
+    share_phone_enable: string;
+}
+
+export interface ShareConfig {
+    icon: string;
+    id: string;
+    name: string;
+    url: string;
+}
+
+export interface WheelsType {
+    /**
+     * 正在进行的转盘活动
+     */
+    activate: Activate;
+    activities: Activity[];
+    not_receive: NotReceive[];
+}
+
+/**
+ * 正在进行的转盘活动
+ */
+export interface Activate {
+    /**
+     * 转盘基金余额
+     */
+    amount: number;
+    /**
+     * 截止时间
+     */
+    end_time: number;
+    history: History[];
+}
+
+export interface History {
+    /**
+     * 增加的金额
+     */
+    amount: number;
+    /**
+     * 时间
+     */
+    time: number;
+    /**
+     * 获取来源 1 初始化  2 玩转盘 3 邀请下载
+     */
+    type: number;
+}
+
+export interface NotReceive {
+    /**
+     * 领取ID
+     */
+    unique_id: string;
+}

+ 2 - 0
src/app/[locale]/(TabBar)/[[...share]]/@actionWidget/Scroll.tsx

@@ -10,6 +10,8 @@ const Scroll = () => {
     // 获取分享id
     const pathname = usePathname();
     useEffect(() => {
+        localStorage.setItem("channel_code", window.location.href);
+
         const [, shareId] = pathname.split("/");
         if (!shareId || shareId === "xxxxxx") return;
         if (shareId.length !== 8) {

+ 4 - 3
src/app/[locale]/(TabBar)/sports/SportsClient.tsx

@@ -7,10 +7,11 @@ interface Props {
     brand_id: string;
     token: string;
 }
-
+//  dedprz | deepwin365 | damslots | chips |   deloro-casino
 const SportsClient: FC<Props> = (props) => {
     const t = useTranslations("ProfilePage");
     const btRef = useRef(null);
+    console.log(`🚀🚀🚀🚀🚀-> in SportsClient.tsx on 14`, props);
     const { brand_id, token } = props;
     const onLoad = () => {
         // @ts-ignore
@@ -22,11 +23,11 @@ const SportsClient: FC<Props> = (props) => {
             onTokenExpired: function () {
                 console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 20`, "token 过期");
             },
-            themeName: "default",
+            themeName: "deloro-casino",
             lang: "pt-br",
             target: document.getElementById("betby"),
             betSlipOffsetBottom: 80,
-            betSlipOffsetRight: 750,
+            // betSlipOffsetRight: 750,
             betSlipZIndex: 0,
             onRouteChange: function () {},
             onLogin: function () {},

+ 12 - 7
src/app/[locale]/(enter)/components/Form/index.tsx

@@ -116,6 +116,10 @@ interface FormProps {
      */
     user_type?: string;
     sex?: number;
+    /**
+     * 渠道链接
+     */
+    channel_code?: string;
 }
 type FormType = "login" | "register";
 interface Props {
@@ -150,14 +154,10 @@ const FormComponent: FC<Props> = (props) => {
     });
 
     const onFinish = (values: FormProps) => {
-        const newValues = {
-            ...values,
-            referrer_code: sessionStorage.getItem("shareId") ?? undefined,
-        };
         if (isStrictMode) {
-            strictHandler(newValues);
+            strictHandler(values);
         } else {
-            looseHandler(newValues);
+            looseHandler(values);
         }
     };
 
@@ -204,7 +204,12 @@ const FormComponent: FC<Props> = (props) => {
         });
         // 注册
         if (type === "register") {
-            registerApi(values)
+            const newValues = {
+                ...values,
+                referrer_code: sessionStorage.getItem("shareId") ?? undefined,
+                channel_code: localStorage.getItem("channel_code") ?? undefined,
+            };
+            registerApi(newValues)
                 .then(async (res) => {
                     if (res.code === 200) {
                         loginHandler(values).then(() => {

+ 32 - 230
src/app/[locale]/(navbar)/cashWheel/CashWheelClient.tsx

@@ -10,7 +10,7 @@ import { Popup, Toast } from "antd-mobile";
 import clsx from "clsx";
 import { useTranslations } from "next-intl";
 import Image from "next/image";
-import { useEffect, useRef, useState } from "react";
+import { useRef, useState } from "react";
 import LotteryWheel from "./LotteryWheel";
 import styles from "./style.module.scss";
 const CashMainCom = () => {
@@ -61,211 +61,6 @@ const DrawMain1 = () => {
         </div>
     );
 };
-const DrawMain2 = () => {
-    const [blocks] = useState([
-        {
-            padding: "20",
-            imgs: [
-                {
-                    src: "/wheels/inner-circle.png",
-                    width: "100%",
-                    height: "100%",
-                },
-            ],
-        },
-    ]);
-    const [prizes] = useState([
-        { background: "#fde187", fonts: [{ text: "0", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "1", top: "20%" }] },
-        { background: "#fde187", fonts: [{ text: "2", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "3", top: "20%" }] },
-        { background: "#fde187", fonts: [{ text: "4", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "5", top: "20%" }] },
-        { background: "#fde187", fonts: [{ text: "6", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "7", top: "20%" }] },
-    ]);
-    const [buttons] = useState([
-        {
-            radius: "30%",
-            imgs: [
-                {
-                    src: "/wheels/pointer.png",
-                    width: "100%",
-                    top: "-130%",
-                },
-            ],
-        },
-    ]);
-    const myLucky = useRef<any>();
-    const titleRef = useRef<any>(null);
-
-    useEffect(() => {
-        const ctx = titleRef.current;
-    }, []);
-    return (
-        <div
-            className={"relative mt-[260px] flex h-[3rem] items-center justify-center"}
-            style={{ background: "/wheels/bg.png", backgroundSize: "100% 100%", zIndex: 2 }}
-        >
-            <img src={"/wheels/bg.png"} className={"absolute -top-[115%]"} />
-            <img
-                src="/wheels/header-bg.png"
-                alt=""
-                className={"absolute -top-[13%] z-10 h-[1.4rem]"}
-            />
-            {/*<canvas id={"titleCanvas"} ref={titleRef} />*/}
-
-            {/*<svg width="100%" height="2.7778rem" className={"absolute -top-[15%] z-[11]"}>*/}
-            {/*    <path*/}
-            {/*        d="M 63 162 C 119 36, 341 0,470 120"*/}
-            {/*        stroke="blue"*/}
-            {/*        stroke-width="4"*/}
-            {/*        id="circle"*/}
-            {/*        fill="transparent"*/}
-            {/*    />*/}
-
-            {/*    <text*/}
-            {/*        style={{*/}
-            {/*            fill: "#ff3333",*/}
-            {/*            fontSize: "30px",*/}
-            {/*            fontWeight: "bold",*/}
-            {/*            textShadow: "0.1em 0.1em rgba(0,0,0,0.5)",*/}
-            {/*        }}*/}
-            {/*    >*/}
-            {/*        <textPath xlinkHref="#circle" textAnchor="middle" startOffset="50%" dy="0">*/}
-            {/*            <tspan>*/}
-            {/*                Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, libero.*/}
-            {/*            </tspan>*/}
-            {/*        </textPath>*/}
-            {/*    </text>*/}
-            {/*</svg>*/}
-
-            <img src={"/wheels/outer-circle.png"} className={"absolute h-[100%]"} />
-
-            {/*<img src={"/wheels/inner-circle.png"} className={"absolute h-[98%]"} />*/}
-            <div className={"flex w-[100%] flex-1 justify-center"}>
-                <LuckyWheel
-                    ref={myLucky}
-                    width="2.95rem"
-                    height="2.95rem"
-                    blocks={blocks}
-                    prizes={prizes}
-                    buttons={buttons}
-                    onStart={() => {
-                        // 点击抽奖按钮会触发star回调
-                        myLucky.current?.play();
-                        setTimeout(() => {
-                            const index = (Math.random() * 6) >> 0;
-                            myLucky.current?.stop(index);
-                        }, 2500);
-                    }}
-                    onEnd={(prize: any) => {
-                        // 抽奖结束会触发end回调
-                        alert("恭喜你抽到 " + prize.fonts[0].text + " 号奖品");
-                    }}
-                />
-            </div>
-        </div>
-    );
-};
-const DrawMain3 = () => {
-    const myLucky = useRef<any>();
-
-    const [blocks] = useState([
-        {
-            padding: "20",
-            imgs: [
-                {
-                    src: "/wheels/inner-circle.png",
-                    width: "100%",
-                    height: "100%",
-                },
-            ],
-        },
-    ]);
-    const [prizes] = useState([
-        { fonts: [{ text: "0", top: "20%" }], background: "#e9e8fe" },
-        { fonts: [{ text: "1", top: "20%" }], background: "#b8c5f2" },
-        { fonts: [{ text: "2", top: "20%" }], background: "#e9e8fe" },
-        { fonts: [{ text: "3", top: "10%" }], background: "#b8c5f2" },
-        { fonts: [{ text: "4", top: "10%" }], background: "#e9e8fe" },
-        { fonts: [{ text: "5", top: "10%" }], background: "#b8c5f2" },
-    ]);
-    const [buttons] = useState([
-        {
-            radius: "30%",
-            imgs: [
-                {
-                    src: "/wheels/pointer.png",
-                    width: "100%",
-                    top: "-130%",
-                },
-            ],
-        },
-    ]);
-    return (
-        <div className={"relative flex h-[2.5rem] items-center justify-center border-4"}>
-            <img src={"/wheels/bg.png"} className={"absolute"} />
-            <div className={"mt-[40px] flex w-[100%] justify-center border-4"}>
-                <img src={"/wheels/outer-circle.png"} className={"absolute h-[100%]"} />
-                <img
-                    src="/wheels/header-bg.png"
-                    alt=""
-                    className={"absolute -bottom-[10px] z-10 h-[1.2rem]"}
-                />
-            </div>
-
-            {/*<svg width="100%" height="2.7778rem" className={"absolute -top-[15%] z-[11]"}>*/}
-            {/*    <path*/}
-            {/*        d="M 63 162 C 119 36, 341 0,470 120"*/}
-            {/*        stroke="blue"*/}
-            {/*        stroke-width="4"*/}
-            {/*        id="circle"*/}
-            {/*        fill="transparent"*/}
-            {/*    />*/}
-
-            {/*    <text*/}
-            {/*        style={{*/}
-            {/*            fill: "#ff3333",*/}
-            {/*            fontSize: "30px",*/}
-            {/*            fontWeight: "bold",*/}
-            {/*            textShadow: "0.1em 0.1em rgba(0,0,0,0.5)",*/}
-            {/*        }}*/}
-            {/*    >*/}
-            {/*        <textPath xlinkHref="#circle" textAnchor="middle" startOffset="50%" dy="0">*/}
-            {/*            <tspan>*/}
-            {/*                Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, libero.*/}
-            {/*            </tspan>*/}
-            {/*        </textPath>*/}
-            {/*    </text>*/}
-            {/*</svg>*/}
-
-            {/*<img src={"/wheels/inner-circle.png"} className={"absolute h-[98%]"} />*/}
-            <div>
-                <LuckyWheel
-                    ref={myLucky}
-                    width="2.95rem"
-                    height="2.95rem"
-                    blocks={blocks}
-                    prizes={prizes}
-                    buttons={buttons}
-                    onStart={() => {
-                        // 点击抽奖按钮会触发star回调
-                        myLucky.current?.play();
-                        setTimeout(() => {
-                            const index = (Math.random() * 6) >> 0;
-                            myLucky.current?.stop(index);
-                        }, 2500);
-                    }}
-                    onEnd={(prize: any) => {
-                        // 抽奖结束会触发end回调
-                        alert("恭喜你抽到 " + prize.fonts[0].text + " 号奖品");
-                    }}
-                />
-            </div>
-        </div>
-    );
-};
 const DrawContent = () => {
     return (
         <div className={styles.drawContent}>
@@ -321,16 +116,20 @@ const Report = () => {
                 <div className={styles.vanTabsWrap}>
                     <div className={styles.vanTabsNav}>
                         <div
-                            className={`${styles.vanTabItem} ${activeTab === "left" ? styles.vanTabAcriveRight : ""}`}
+                            className={`${styles.vanTabItem} ${activeTab === "right" ? styles.vanTabAcriveRight : ""} `}
                             onClick={() => handler("left")}
                         >
-                            Relatório
+                            <span className={activeTab === "left" ? styles.activeText : ""}>
+                                Relatório
+                            </span>
                         </div>
                         <div
-                            className={`${styles.vanTabItem} ${activeTab === "right" ? styles.vanTabAcriveLeft : ""}`}
+                            className={`${styles.vanTabItem} ${activeTab === "left" ? styles.vanTabAcriveLeft : ""}`}
                             onClick={() => handler("right")}
                         >
-                            Minha Referencia
+                            <span className={activeTab === "right" ? styles.activeText : ""}>
+                                Minha Referencia
+                            </span>
                         </div>
                     </div>
                 </div>
@@ -405,7 +204,7 @@ const DrawMain = () => {
             padding: "0",
             imgs: [
                 {
-                    src: "/wheels/center-light.png",
+                    src: "/wheels/wheel.png",
                     width: "100%",
                     height: "100%",
                 },
@@ -413,14 +212,14 @@ const DrawMain = () => {
         },
     ]);
     const [prizes] = useState([
-        { background: "#fde187", fonts: [{ text: "0", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "1", top: "20%" }] },
-        { background: "#fde187", fonts: [{ text: "2", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "3", top: "20%" }] },
-        { background: "#fde187", fonts: [{ text: "4", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "5", top: "20%" }] },
-        { background: "#fde187", fonts: [{ text: "6", top: "20%" }] },
-        { background: "#faf3c3", fonts: [{ text: "7", top: "20%" }] },
+        { fonts: [{ text: "0", top: "20%" }] },
+        { fonts: [{ text: "1", top: "20%" }] },
+        { fonts: [{ text: "2", top: "20%" }] },
+        { fonts: [{ text: "3", top: "20%" }] },
+        { fonts: [{ text: "4", top: "20%" }] },
+        { fonts: [{ text: "5", top: "20%" }] },
+        { fonts: [{ text: "6", top: "20%" }] },
+        { fonts: [{ text: "7", top: "20%" }] },
     ]);
     const [buttons] = useState([
         {
@@ -434,6 +233,10 @@ const DrawMain = () => {
             ],
         },
     ]);
+
+    const [defaultConfig] = useState({
+        offsetDegree: 20,
+    });
     return (
         <div className={"relative"}>
             <WheelWallet />
@@ -456,13 +259,10 @@ const DrawMain = () => {
 
                         <div
                             className={
-                                "mr-[0.07rem] flex h-[2.3rem] w-[2.3rem] " +
+                                "mr-[0.07rem] flex h-[2.35rem] w-[2.35rem] " +
                                 " absolute" +
-                                " bottom-[0.2rem] z-50 rounded-[50%]"
+                                " bottom-[0.17rem] z-50 rounded-[50%]"
                             }
-                            style={{
-                                boxShadow: "rgba(255, 255, 255, 1) 0px 0px 60px 12px inset",
-                            }}
                         >
                             {/*<div*/}
                             {/*    className={*/}
@@ -478,9 +278,10 @@ const DrawMain = () => {
 
                             <LuckyWheel
                                 ref={myLucky}
-                                width="2.3rem"
-                                height="2.3rem"
+                                width="2.35rem"
+                                height="2.35rem"
                                 blocks={blocks}
+                                defaultConfig={defaultConfig}
                                 prizes={prizes}
                                 buttons={buttons}
                                 onStart={() => {
@@ -519,9 +320,9 @@ const DrawMain = () => {
 
                         <div
                             className={
-                                "-mr-[0.08rem] flex h-[2.3rem] w-[2.3rem] " +
+                                "-mr-[0.05rem] flex h-[2.3rem] w-[2.3rem] " +
                                 " absolute" +
-                                " bottom-[0.03rem]"
+                                " bottom-[0.045rem]"
                             }
                         >
                             {/*<div*/}
@@ -538,9 +339,10 @@ const DrawMain = () => {
 
                             <LuckyWheel
                                 ref={desktopWheelRef}
-                                width="2.15rem"
-                                height="2.15rem"
+                                width="2.2rem"
+                                height="2.2rem"
                                 blocks={blocks}
+                                defaultConfig={defaultConfig}
                                 prizes={prizes}
                                 buttons={buttons}
                                 onStart={() => {

+ 31 - 23
src/app/[locale]/(navbar)/cashWheel/style.module.scss

@@ -321,8 +321,10 @@
       box-sizing: content-box;
       height: 100%;
       padding-bottom: 15px;
-      padding-right: 8px;
-      padding-left: 8px;
+      //padding-right: 8px;
+      //padding-left: 8px;
+      border-radius: 15px;
+      background: #000;
 
       .vanTabsWrap{
         overflow: initial;
@@ -347,10 +349,11 @@
           background: transparent;
           -webkit-user-select: none;
           user-select: none;
-
+          border-top-right-radius: 20px;
+          border-top-left-radius: 20px;
       }
       .vanTabItem{
-        background: #17181b;
+        background: #000;
         color: #9c9c9c;
         font-size: 0.15rem;
         height:.45rem;
@@ -362,44 +365,46 @@
         justify-content: center;
         cursor: pointer;
 
-        &:nth-child(2){
-          flex:2;
+        & .activeText{
+          position: relative;
+          color: #fff;
+          //border: 1px solid red;
+          text-decoration: underline #15a920;
+          text-underline-offset: 8px;
         }
-
         &.vanTabAcriveRight{
-          color: #fff;
-          background: red;
           position: relative;
-          border-radius: 15px 15px 0   0 ;
+          z-index: 1;
           &:before{
             content: '';
             position: absolute;
-            width: 60px;
+            left: 0;
+            z-index: -1;
+            width: 110%;
             height: 100%;
-            background: radial-gradient(circle at 100%  0%, transparent 60px, red 62px);
-            bottom: 0;
-            right: -60px;
+            background-image: url("/wheels/right-button.png");
+            background-size: 100% 100%;
           }
         }
         &.vanTabAcriveLeft{
-          color: #fff;
-          background: #1c1e21;
           position: relative;
-          border-top-right-radius: 15px;
+          z-index: 1;
           &:before{
             content: '';
             position: absolute;
-            width: 60px;
-            height: 60px;
-            background: radial-gradient(circle at 0%  100%, transparent 60px, #1c1e21 61px);
-            top: 0;
-            left: -60px;
+            right: 0;
+            z-index: -1;
+            width: 110%;
+            height: 100%;
+            background-image: url("/wheels/left-button.png");
+            background-size: 100% 100%;
           }
         }
       }
 
       .vanTabsContent{
-        margin-top: .17rem;
+        margin-top: .15rem;
+        //background: #000;
         .vantabpane{
           width: 100%;
           box-sizing: border-box;
@@ -407,12 +412,15 @@
         .tabContent{
           height:1.7rem;
           overflow: hidden;
+
         }
 
         .winList {
           height: 100%;
           animation: smoothscroll 12.6s linear infinite;
           .item {
+
+
             height: .3rem!important;
             font-size: .12rem;
             -webkit-box-sizing: border-box;

+ 1 - 0
src/types/lucky-canvas.d.ts

@@ -9,6 +9,7 @@ declare module "@lucky-canvas/react" {
         buttons: A[];
         onStart: () => void;
         onEnd: (p: P) => void;
+        defaultConfig: any;
     }
     export const LuckyWheel: FC<LuckyCanvasProps>;
 }

+ 1 - 1
src/utils/server/index.ts

@@ -67,7 +67,7 @@ class Server {
             console.log(
                 `🚀🚀🚀🚀🚀-> in index.ts on 67`,
                 error,
-                `${this.BASE_URL}:${options.url}`,
+                `${this.BASE_URL}${options.url}`,
                 JSON.stringify(options)
             );
             return Promise.reject(error);