From a92248bff7d6a2682146712218bcd5a75a4faa2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Mon, 27 Jul 2026 14:30:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(api):=20=E4=BF=AE=E5=A4=8D=E6=A0=B9?= =?UTF-8?q?=E6=8D=AEcode=E6=9F=A5=E8=AF=A2=E7=A7=9F=E6=88=B7=E6=97=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改getByCode函数中请求返回类型为ApiResult - 修正对返回数据的访问以匹配新的类型结构 - 确保类型安全和避免潜在运行时错误 --- src/api/system/tenant/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index f09388d..a0fd2c3 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -181,7 +181,7 @@ export async function initialization(roleId?: number) { * 根据code查询租户 */ export async function getByCode(code: string) { - const res = await request.get( + const res = await request.get>( SERVER_API_URL + '/system/tenant/getByCode/' + code ); if (res.data.code === 0 && res.data.data) {