From 1a0bdb7b6df0757560132501df35205fbbb078ae Mon Sep 17 00:00:00 2001 From: BTMuli Date: Mon, 22 Dec 2025 18:28:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E8=B4=A6=E5=8F=B7=E5=88=87=E6=8D=A2=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/app/to-switchAc.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/app/to-switchAc.vue b/src/components/app/to-switchAc.vue index 266ad368..28a239c9 100644 --- a/src/components/app/to-switchAc.vue +++ b/src/components/app/to-switchAc.vue @@ -3,30 +3,30 @@
账号管理
- + @@ -49,7 +49,7 @@ import TSUserAccount from "@Sqlm/userAccount.js"; import useUserStore from "@store/user.js"; import TGLogger from "@utils/TGLogger.js"; import { storeToRefs } from "pinia"; -import { shallowRef, ref, watch } from "vue"; +import { ref, shallowRef, watch } from "vue"; type TsaAcItem = { user: TGApp.App.Account.User; gameAc: Array }; @@ -105,6 +105,7 @@ async function tryConfirm(): Promise { showSnackbar.warn("无需切换当前账号"); return; } + console.log(curUid.value, curGameUid.value); const acFind = ac.value.find((u) => u.user.uid === curUid.value); if (!acFind) { showSnackbar.error("未找到对应用户信息,请重试"); @@ -118,8 +119,8 @@ async function tryConfirm(): Promise { showSnackbar.error("未找到对应游戏账号信息,请重试"); return; } else { - account.value = game; - await userStore.switchGameAccount(game.gameUid); + const res = await userStore.switchGameAccount(game.gameUid); + if (!res) return; showSnackbar.success(`成功切换到用户${uid.value}的游戏UID${game.gameUid}`); await TGLogger.Info(`[ToSwitchAc] 切换到用户${uid.value}的游戏UID${game.gameUid}成功`); visible.value = false;