From 80c6f0b7a7e20e111e0c6857408078f9bc250217 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Tue, 7 Oct 2025 22:32:11 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/api/Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/api/Client.ts b/client/api/Client.ts index 8a75c08..fb7c71b 100644 --- a/client/api/Client.ts +++ b/client/api/Client.ts @@ -44,7 +44,6 @@ class Client { } static invoke(method: CallMethod, args: unknown = {}, timeout: number = 5000, refreshAndRetryLimit: number = 3, forceRefreshAndRetry: boolean = false): Promise { // 在 未初始化 / 未建立连接且调用非可调用接口 的时候进行延迟 - console.log(this.connected, method) if (this.socket == null || (!this.connected && !CallableMethodBeforeAuth.includes(method))) { return new Promise((reslove) => { setTimeout(async () => reslove(await this.invoke(method, args, timeout)), 500) @@ -95,6 +94,7 @@ class Client { access_token: token }, timeout, 1, true) if (re.code == 200) { + // 灵车: 你应该先 connected = true 再调用 await this.updateCachedProfile() document.cookie = 'token=' + token document.cookie = 'device_id=' + data.device_id