From 4b6104f956ddea29323f0a5f92e95eba217d124e Mon Sep 17 00:00:00 2001 From: BTMuli Date: Sat, 3 Jan 2026 00:21:16 +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=E9=80=9A=E8=BF=87ck=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=8D=B3=E6=97=B6=E5=88=B7=E6=96=B0=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/app/t-sidebar.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/app/t-sidebar.vue b/src/components/app/t-sidebar.vue index 13f25e33..de233e7a 100644 --- a/src/components/app/t-sidebar.vue +++ b/src/components/app/t-sidebar.vue @@ -116,9 +116,9 @@ - + @@ -669,17 +669,20 @@ async function addByCookie(): Promise { isTryLogin.value = false; return; } - const briefInfo: TGApp.App.Account.BriefInfo = { + const briefInfoGet: TGApp.App.Account.BriefInfo = { nickname: briefRes.nickname, uid: briefRes.uid, avatar: briefRes.avatar_url, desc: briefRes.introduce, }; + uid.value = briefRes.uid; + briefInfo.value = briefInfoGet; + isLogin.value = true; await showLoading.update("正在保存用户数据"); await TSUserAccount.account.saveAccount({ - uid: briefInfo.uid, + uid: briefInfoGet.uid, cookie: ck, - brief: briefInfo, + brief: briefInfo.value, updated: "", }); await showLoading.update("正在获取游戏账号"); @@ -691,14 +694,15 @@ async function addByCookie(): Promise { return; } await showLoading.update("正在保存游戏账号"); - await TSUserAccount.game.saveAccounts(briefInfo.uid, gameRes); - const curAccount = await TSUserAccount.game.getCurAccount(briefInfo.uid); + await TSUserAccount.game.saveAccounts(briefInfoGet.uid, gameRes); + const curAccount = await TSUserAccount.game.getCurAccount(briefInfoGet.uid); if (!curAccount) { await showLoading.end(); showSnackbar.warn("未检测到游戏账号,请重新刷新"); isTryLogin.value = false; return; } + account.value = curAccount; await showLoading.end(); showSnackbar.success("成功添加用户!"); isTryLogin.value = false;