From 31bb1b1fe3225ca7bb9ae3104d34ca449dd7f77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E5=87=A1=E4=B8=BB=E5=84=BF?= <15541157+extraordinary-lord@user.noreply.gitee.com> Date: Tue, 21 Oct 2025 10:52:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=9B=9E=E8=B0=83=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/common/TwitterCallbackModal.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/components/common/TwitterCallbackModal.tsx b/components/common/TwitterCallbackModal.tsx index ddb5157..57f4121 100644 --- a/components/common/TwitterCallbackModal.tsx +++ b/components/common/TwitterCallbackModal.tsx @@ -56,17 +56,12 @@ export default function TwitterCallbackModal({ } // 调用 Twitter 授权回调接口 - const response = await fetch(`${baseUrl}/api/video-share/x/auth/callback`, { + const response = await fetch(`${baseUrl}/api/video-share/x/auth/callback?state=${encodeURIComponent(urlParams.state)}&code=${encodeURIComponent(urlParams.code)}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${localStorage.getItem('token') || ''}` - }, - body: JSON.stringify({ - user_id: userId, - state: urlParams.state, - code: urlParams.code, - }) + } }); const data = await response.json();