From 6302f171e96b54e4415fccc087181aeea88b3414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sun, 9 Mar 2025 22:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E8=AE=B0=E5=BD=95=E6=89=80?= =?UTF-8?q?=E6=9C=89=E8=B4=A6=E5=8F=B7=E4=BD=86=E5=8F=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=8E=9F=E7=A5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pageConfig/tc-userBadge.vue | 3 ++- src/store/modules/user.ts | 4 ++-- src/web/request/takumiReq.ts | 4 +--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/pageConfig/tc-userBadge.vue b/src/components/pageConfig/tc-userBadge.vue index 683ac4fc..d75ea40f 100644 --- a/src/components/pageConfig/tc-userBadge.vue +++ b/src/components/pageConfig/tc-userBadge.vue @@ -441,7 +441,8 @@ async function showAccounts(): Promise { showSnackbar.warn("未登录!"); return; } - gameAccounts.value = await TSUserAccount.game.getAccount(uid.value); + const accountsGet = await TSUserAccount.game.getAccount(uid.value); + gameAccounts.value = accountsGet.filter((a) => a.gameBiz === "hk4e_cn"); if (gameAccounts.value.length === 0) { showSnackbar.warn("未找到账户的游戏数据,请尝试刷新!"); return; diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index ffa82b41..f516d025 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -1,7 +1,7 @@ /** * @file store/modules/user.ts * @description 用户信息模块 - * @since Beta v0.6.8 + * @since Beta v0.7.2 */ import showSnackbar from "@comp/func/snackbar.js"; @@ -52,7 +52,7 @@ export const useUserStore = defineStore( return false; } const gameAccounts = await TSUserAccount.game.getAccount(uid.value); - const accountFind = gameAccounts.find((a) => a.gameUid === uidG); + const accountFind = gameAccounts.find((a) => a.gameUid === uidG && a.gameBiz === "hk4e_cn"); if (!accountFind) { showSnackbar.warn("未找到账户绑定的游戏账户"); return false; diff --git a/src/web/request/takumiReq.ts b/src/web/request/takumiReq.ts index 8a0903d7..522b0a6a 100644 --- a/src/web/request/takumiReq.ts +++ b/src/web/request/takumiReq.ts @@ -135,13 +135,11 @@ async function getUserGameRolesByCookie( cookie: TGApp.App.Account.Cookie, ): Promise | TGApp.BBS.Response.Base> { const ck = { account_id: cookie.account_id, cookie_token: cookie.cookie_token }; - const params = { game_biz: "hk4e_cn" }; const resp = await TGHttp( `${taBu}binding/api/getUserGameRolesByCookie`, { method: "GET", - headers: getRequestHeader(ck, "GET", params), - query: params, + headers: getRequestHeader(ck, "GET", {}), }, ); if (resp.retcode !== 0) return resp;