|
@@ -1,6 +1,7 @@
|
|
|
import { GameListRep, GameRequest, getGameDetailApi } from "@/api/home";
|
|
|
-import { useRouter } from "@/i18n/routing";
|
|
|
+import { useRouter, defaultLocale } from "@/i18n/routing";
|
|
|
import { brandList } from "@/utils/constant";
|
|
|
+import { getCookies } from "@/utils/Cookies";
|
|
|
import { Toast } from "antd-mobile";
|
|
|
import { useTranslations } from "next-intl";
|
|
|
// 地址白名单
|
|
@@ -15,7 +16,8 @@ const useGame = () => {
|
|
|
maskStyle: { zIndex: 99999, background: "rgba(0,0,0,0.5)" },
|
|
|
});
|
|
|
const brand = brandList.find((item) => item.gid === game.game_id)?.brand ?? "";
|
|
|
- getGameDetailApi(params)
|
|
|
+ const lang = getCookies("language") || defaultLocale;
|
|
|
+ getGameDetailApi({...params, language: lang === 'br' ? 'pt' : lang})
|
|
|
.then((res) => {
|
|
|
Toast.clear();
|
|
|
if (res.data && res.data.game_url) {
|