From 7d0e0f187ca38a6b86668444fda6278c222ead40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sat, 1 Mar 2025 12:37:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pageConfig/tc-userBadge.vue | 1 - src/plugins/Mys/request/doCaptchaLogin.ts | 8 ++++---- src/types/BBS/Response.d.ts | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/pageConfig/tc-userBadge.vue b/src/components/pageConfig/tc-userBadge.vue index 54da60ca..8ea175c2 100644 --- a/src/components/pageConfig/tc-userBadge.vue +++ b/src/components/pageConfig/tc-userBadge.vue @@ -404,7 +404,6 @@ async function tryGetCaptcha(phone: string, aigis?: string): Promise} @@ -44,7 +44,7 @@ function rsaEncrypt(data: string): string { export async function getCaptcha( phone: string, aigis?: string, -): Promise { +): Promise> { const url = "https://passport-api.mihoyo.com/account/ma-cn-verifier/verifier/createLoginCaptcha"; const device_fp = getDeviceInfo("device_fp"); const device_name = getDeviceInfo("device_name"); @@ -78,7 +78,7 @@ export async function getCaptcha( ); const data = await resp.data; if (data.retcode !== 0) { - return { + return >{ retcode: data.retcode, message: data.message, data: resp.resp.headers.get("x-rpc-aigis"), diff --git a/src/types/BBS/Response.d.ts b/src/types/BBS/Response.d.ts index 319cffd7..b53053ad 100644 --- a/src/types/BBS/Response.d.ts +++ b/src/types/BBS/Response.d.ts @@ -1,7 +1,7 @@ /** * @file types/BBS/Response.d.ts * @description BBS 返回数据类型定义文件 - * @since Beta v0.6.0 + * @since Beta v0.7.1 */ declare namespace TGApp.BBS.Response { @@ -19,11 +19,11 @@ declare namespace TGApp.BBS.Response { /** * @description 基础返回类型-带有 data 的 * @interface BaseWithData - * @since Beta v0.3.6 + * @since Beta v0.7.1 * @property {0} retcode - 响应代码 * @property {string} message - 响应消息 * @property {any} data - 响应数据 * @return BaseWithData */ - type BaseWithData = { retcode: 0; message: string; data: unknown }; + type BaseWithData = { retcode: 0; message: string; data: T }; }