瀏覽代碼

fix:改用provider字段

XianCH 3 月之前
父節點
當前提交
64663726db
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/hooks/useGame.tsx

+ 1 - 1
src/hooks/useGame.tsx

@@ -57,7 +57,7 @@ const useGame = () => {
                     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?.toUpperCase() === 'PP') {
+                    if (game.provider?.toUpperCase() === 'PP') {
                         const ppUrl = `${encodeURI(res.data.game_url)}&category_name=${game.provider}`;
                         window.open(ppUrl, '_self');
                         return