Selaa lähdekoodia

fix: 修改tabs栏

ansoni 4 kuukautta sitten
vanhempi
commit
cef0c25dfc
4 muutettua tiedostoa jossa 16 lisäystä ja 14 poistoa
  1. 1 1
      .env.local
  2. 2 0
      src/api/home.ts
  3. 12 12
      src/app/[locale]/(TabBar)/[[...share]]/_home/HomeTabs.tsx
  4. 1 1
      src/hooks/useGame.tsx

+ 1 - 1
.env.local

@@ -1,7 +1,7 @@
 # 环境
 #baseurl
 # NEXT_PUBLIC_BASE_URL=http://192.168.0.71:8800
-NEXT_PUBLIC_BASE_URL=http://192.168.0.84:8800
+NEXT_PUBLIC_BASE_URL=https://br-api.tiktokjakjkl.icu
 #NEXT_PUBLIC_BASE_URL=https://3rd-api.tiktokjakjkl.icu
 #share link
 NEXT_PUBLIC_SHARE_URL=http://192.168.0.84:3000

+ 2 - 0
src/api/home.ts

@@ -136,6 +136,8 @@ export interface GameListRep {
     demo?: number;
     // 自定义游戏类型
     category_name?: string;
+
+    coin_types?: number;
 }
 
 /**

+ 12 - 12
src/app/[locale]/(TabBar)/[[...share]]/_home/HomeTabs.tsx

@@ -43,29 +43,29 @@ const buttonGroup = [
     //     locale: true,
     //     lock: true,
     // },
-    {
-        icon: "huodongyule",
-        category_name: "third",
-        isHot: false,
-        url: "/sports",
-        locale: true,
-        lock: false,
-    },
+    // {
+    //     icon: "huodongyule",
+    //     category_name: "third",
+    //     isHot: false,
+    //     url: "/sports",
+    //     locale: true,
+    //     lock: false,
+    // },
     {
         icon: "shipin",
         category_name: "fourth",
         isHot: false,
-        url: "/gameList/112",
+        url: "/gameList?gameListFlag=10&type=1&bet_type=1&name=live",
         locale: true,
-        lock: true,
+        lock: false,
     },
     {
         icon: "yingyong",
         category_name: "Fifth",
         isHot: false,
-        url: "/gameList/110",
+        url: "/download",
         locale: true,
-        lock: true,
+        lock: false,
     },
 ] as const;
 

+ 1 - 1
src/hooks/useGame.tsx

@@ -13,7 +13,7 @@ const useGame = () => {
     const pathname = usePathname();
 
     const getCoinType = (game: GameListRep, mode: number) => {
-        const type = game.coin_types;
+        const type = game.coin_types!;
         // 本金加彩金
         if (mode) return mode;
         if (type & 1 || type & 2) {