|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
|
import { Toast } from "antd-mobile";
|
|
|
import { useTranslations } from "next-intl";
|
|
@@ -18,7 +17,7 @@ const useGame = () => {
|
|
|
duration: 0,
|
|
|
maskStyle: { zIndex: 99999, background: "rgba(0,0,0,0.5)" },
|
|
|
});
|
|
|
- const brand = brandList.find((item) => item.gid === game.game_id)?.brand ?? "";
|
|
|
+ // const brand = brandList.find((item) => item.gid === game.game_id)?.brand ?? "";
|
|
|
const lang = getCookies("language") || defaultLocale;
|
|
|
getGameDetailApi({ ...params, language: lang === "br" ? "pt" : lang })
|
|
|
.then((res) => {
|
|
@@ -30,11 +29,11 @@ const useGame = () => {
|
|
|
// 然后是文档对象
|
|
|
if (game_url.indexOf("!doctype") !== -1) {
|
|
|
sessionStorage.setItem("game_url", res.data.game_url);
|
|
|
- const url = `${encodeURI(window.location.href)}&brand=${brand}&return_url=${window.location.href.replace(pathname, "")}&category_name=${game.provider}`;
|
|
|
+ const url = `${encodeURI(window.location.href)}&return_url=${window.location.href.replace(pathname, "")}&category_name=${game.provider}`;
|
|
|
router.push(`/game?${url}`);
|
|
|
return;
|
|
|
}
|
|
|
- const url = `${encodeURI(res.data.game_url)}&brand=${brand}&return_url=${window.location.href.replace(pathname, "")}&category_name=${game.provider}`;
|
|
|
+ const url = `${encodeURI(res.data.game_url)}&return_url=${window.location.href.replace(pathname, "")}&category_name=${game.provider}`;
|
|
|
if (new RegExp("https").test(game_url)) {
|
|
|
// 如果是https
|
|
|
router.push(`/game?${url}`);
|