Bläddra i källkod

Merge branch 'feature-Before' into dev

ansoni 5 månader sedan
förälder
incheckning
9f1eef76e9

+ 4 - 0
src/app/[locale]/(TabBar)/deposit/DepositData.tsx

@@ -13,6 +13,7 @@ import { FC, useLayoutEffect, useRef, useState } from "react";
 
 import actions from "@/app/[locale]/(TabBar)/deposit/actions";
 import Empty from "@/components/Empty";
+import { useEventPoint } from "@/hooks/useEventPoint";
 import { useRouter } from "@/i18n/routing";
 import { useSystemStore } from "@/stores/useSystemStore";
 import "@/styles/deposit.scss";
@@ -80,6 +81,7 @@ const DepositData: FC<Props> = (props) => {
     const t = useTranslations();
     const router = useRouter();
     const userInfo = useUserInfoStore((state) => state.userInfo);
+    const { eventInitiate } = useEventPoint();
 
     const isStrictMode = useSystemStore((state) => state.identity_verify.deposit === 1);
 
@@ -89,6 +91,7 @@ const DepositData: FC<Props> = (props) => {
 
     const formInstanceRef = useRef<FormInstance>(null);
     let [amount, setAmount] = useState<number | undefined>(undefined);
+
     const titleChangeHandler = (item: DepositsTypes, index: number) => {
         setAmount(undefined);
         setActiveType(item);
@@ -120,6 +123,7 @@ const DepositData: FC<Props> = (props) => {
                 //     "https://caixa.pay4z.com/brl/qrcode.html?tradeNo=T2501180056ijk21kJ&amount=20&payAmount=20&currency=BRL&expiredAt=2025-01-18%2001%3A11%3A31&expire=1737173491282&raw=00020101021226870014br.gov.bcb.pix2565qrcode.santsbank.com%2Fdynamic%2Fdc8cf003-1616-47f8-94e6-16be500d05b45204000053039865802BR5907LF%20LTDA6009Sao%20Paulo62070503***6304DF54&type=QRCODE";
 
                 if (res.data.pay_url) {
+                    eventInitiate();
                     // fix: ios 限制
                     setTimeout(() => {
                         window.open(res.data.pay_url);

+ 3 - 0
src/app/[locale]/(TabBar)/profile/template.tsx

@@ -0,0 +1,3 @@
+export default function Template({ children }: { children: React.ReactNode }) {
+    return children;
+}

+ 4 - 2
src/hooks/useGame.tsx

@@ -1,4 +1,5 @@
 import { GameListRep, GameRequest, getGameDetailApi } from "@/api/home";
+import { useEventPoint } from "@/hooks/useEventPoint";
 import { defaultLocale, usePathname, useRouter } from "@/i18n/routing";
 import { brandList } from "@/utils/constant";
 import { getCookies } from "@/utils/Cookies";
@@ -9,6 +10,7 @@ const whiteUrls = ["192.168.0.84", "localhost", "192.168.0.46"];
 const useGame = () => {
     const router = useRouter();
     const t = useTranslations();
+    const { eventStartTrial } = useEventPoint();
     const pathname = usePathname();
     const getGameUrl = (game: GameListRep, params: GameRequest) => {
         Toast.show({
@@ -22,9 +24,9 @@ const useGame = () => {
             .then((res) => {
                 Toast.clear();
                 if (res.data && res.data.game_url) {
+                    eventStartTrial();
+
                     const game_url = res.data.game_url;
-                    //
-                    console.log(`🚀🚀🚀🚀🚀-> in useGame.tsx on 28`);
                     // 然后是文档对象
                     if (game_url.indexOf("!doctype") !== -1) {
                         sessionStorage.setItem("game_url", res.data.game_url);