From 9b8a188038ac393e92777f76496fe7a23e9471bc Mon Sep 17 00:00:00 2001 From: "LUOJIE\\coolp" Date: Tue, 3 Mar 2026 14:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=BD=E7=95=A5roma?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/components/base/iframe-postmessage.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx b/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx index 7863bad9..3eff9a6c 100644 --- a/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx +++ b/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx @@ -76,20 +76,19 @@ const IframePostMessage = () => { * fetchAndStoreEmail * 调用 /console/api/account/profile 接口,获取当前用户信息, * 并将其中的 email 字段写入浏览器 Cookie。 - * 若当前页面 URL 携带 key 参数,则跳过请求与写入。 + * 若当前页面 URL 携带 key 参数或包含子串 roma,则跳过请求与写入。 */ const fetchAndStoreEmail = async () => { try { if (typeof window !== 'undefined') { try { - console.log("===========================:fetchAndStoreEmail") - const hasKeyParam = new URL(globalThis.location.href).searchParams.has('key') - if (hasKeyParam) return - } - catch { - // ignore parse error - } + const url = new URL(globalThis.location.href) + const hasKeyParam = url.searchParams.has('key') + const hasRoma = url.href.toLowerCase().includes('roma') + if (hasKeyParam || hasRoma) return + } catch {} } + //获取页面路径,如果url中包含字符串roma则不进行任何处理 const profile = await get<{ email: string }>('/account/profile') const email = profile?.email || '' if (email) {