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 }; }