在iframe中则不请求接口和写入email

This commit is contained in:
2026-02-26 18:29:52 +08:00
parent 81dff2e5e2
commit 6571d91c7a

View File

@@ -79,6 +79,8 @@ const IframePostMessage = () => {
*/ */
const fetchAndStoreEmail = async () => { const fetchAndStoreEmail = async () => {
try { try {
if (typeof window !== 'undefined' && window.parent !== window)
return
const profile = await get<{ email: string }>('/account/profile') const profile = await get<{ email: string }>('/account/profile')
const email = profile?.email || '' const email = profile?.email || ''
if (email) { if (email) {