From 0a2ea6d2fa31f1d1ebd15e8e157da9f866431f1c Mon Sep 17 00:00:00 2001 From: Senor-Liu <71912659+Senor-Liu@users.noreply.github.com> Date: Fri, 21 Aug 2026 15:05:36 +0800 Subject: [PATCH] =?UTF-8?q?merge:=20=E5=90=88=E5=B9=B6=E6=96=B0=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/pepAuth/container/pepAuth.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/client/src/sections/pepAuth/container/pepAuth.jsx b/web/client/src/sections/pepAuth/container/pepAuth.jsx index ef0da45..667cfc1 100644 --- a/web/client/src/sections/pepAuth/container/pepAuth.jsx +++ b/web/client/src/sections/pepAuth/container/pepAuth.jsx @@ -27,6 +27,10 @@ export default function PepAuth() { const pepUserId = userRes.payload.data?.pepUserId || userRes.payload.data?.pepId || userRes.payload.data?.id; localStorage.setItem('userId', String(pepUserId || '')); localStorage.setItem('userInfo', JSON.stringify(userRes.payload.data)); + // 保存 PEP token:localStorage 供前端读取;cookie 随请求自动携带, + + localStorage.setItem('pepToken', token); + document.cookie = `pepToken=${encodeURIComponent(token)}; path=/; max-age=86400`; window.location.replace(urlParams.get('redirect') || '/chat'); } else { message.warning('鉴权失败,请返回聊天页面');