Browse Source

url编码

zcj03 6 tháng trước cách đây
mục cha
commit
8dc5ed67ed
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/hooks/useGame.tsx

+ 1 - 1
src/hooks/useGame.tsx

@@ -19,7 +19,7 @@ const useGame = () => {
             .then((res) => {
                 Toast.clear();
                 if (res.data && res.data.game_url) {
-                    const url = `${res.data?.game_url}&brand=${brand}&return_url=${process.env.NEXT_PUBLIC_SHARE_URL}`;
+                    const url = `${encodeURI(res.data.game_url)}&brand=${brand}&return_url=${process.env.NEXT_PUBLIC_SHARE_URL}`;
                     const protocol = new URL(url).protocol;
                     if (
                         whiteUrls.indexOf(window.location.hostname) !== -1 ||