From d939fe3f31b5754b56782c0f284d94180aa6f73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sat, 11 Apr 2026 18:53:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(passport):=20=E4=BF=AE=E6=AD=A3=E9=82=80?= =?UTF-8?q?=E8=AF=B7=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=B8=8E=E8=AF=B7=E6=B1=82=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将邀请令牌作为查询参数附加在请求URL中 - 移除请求体中的token字段传递 - 添加请求头TenantId,值为5 - 请求失败时在控制台打印错误信息以便调试 - 保持原有错误处理和加载状态设置逻辑不变 --- src/passport/invite/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/passport/invite/index.tsx b/src/passport/invite/index.tsx index 12d5af0..0c00cc1 100644 --- a/src/passport/invite/index.tsx +++ b/src/passport/invite/index.tsx @@ -75,10 +75,12 @@ const InvitePage: React.FC = () => { const fetchInviteInfo = async (inviteToken: string) => { try { const res = await Taro.request({ - url: `${SERVER_API_URL}/api/_app/developer/invite/info`, + url: `${SERVER_API_URL}/api/_app/developer/invite/info?token=${encodeURIComponent(inviteToken)}`, method: 'GET', - data: { token: inviteToken }, - header: { 'content-type': 'application/json' } + header: { + 'content-type': 'application/json', + 'TenantId': 5 + } }); if (res.data.code === 200 || res.data.code === 0) { @@ -87,6 +89,7 @@ const InvitePage: React.FC = () => { setError(res.data.message || '邀请信息获取失败'); } } catch (err: any) { + console.error('获取邀请信息失败:', err); setError(err.message || '网络请求失败'); } finally { setLoading(false);