|
@@ -46,7 +46,6 @@ const useGame = () => {
|
|
|
|
|
|
// 获取游戏的品牌
|
|
|
const category_name = game?.category_name;
|
|
|
- console.log(`🚀🚀🚀🚀🚀-> in useGame.tsx on 28`,game,res.data);
|
|
|
|
|
|
// 然后是文档对象
|
|
|
if (game_url.indexOf("!doctype") !== -1) {
|
|
@@ -56,6 +55,14 @@ const useGame = () => {
|
|
|
return;
|
|
|
}
|
|
|
const url = `${encodeURI(res.data.game_url)}&return_url=${encodeURI(window.location.href.replace(pathname, ""))}&category_name=${game.provider}`;
|
|
|
+
|
|
|
+ // 如果是pp游戏,则当前窗口打开新的地址,不需要加return_url
|
|
|
+ if(category_name === 'PP'){
|
|
|
+ const ppUrl = `${encodeURI(res.data.game_url)}&category_name=${game.provider}`;
|
|
|
+ window.open(ppUrl,'_self');
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if (new RegExp("https").test(game_url)) {
|
|
|
// 如果是https
|
|
|
router.push(`/game?${url}`);
|