From 4f29a33d04d266bc62d1250f9bafc81b0e8b78cb Mon Sep 17 00:00:00 2001 From: nanguiyixin Date: Mon, 25 May 2026 21:27:06 +0800 Subject: [PATCH] Update fourth-wall.html --- modules/fourth-wall/fourth-wall.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/fourth-wall/fourth-wall.html b/modules/fourth-wall/fourth-wall.html index 4f5953da..8d0f1ec6 100644 --- a/modules/fourth-wall/fourth-wall.html +++ b/modules/fourth-wall/fourth-wall.html @@ -2184,16 +2184,18 @@

API配置

} function hydrateImageSlots(container) { - initImageObserver(); - container.querySelectorAll('.fw-img-slot:not([data-observed])').forEach(slot => { - slot.setAttribute('data-observed', '1'); - if (!slot.dataset.loaded && !slot.dataset.loading) { - slot.innerHTML = `
滚动加载
`; - } - imageObserver.observe(slot); + container.querySelectorAll('.fw-img-slot:not([data-loaded]):not([data-loading])').forEach(slot => { + const tags = parseImageToken(decodeURIComponent(slot.dataset.raw || '')); + if (!tags) return; + slot.dataset.loading = '1'; + const requestId = 'fwimg_' + Date.now() + '_' + Math.random().toString(36).slice(2, 8); + pendingImages.set(requestId, { slot, tags }); + slot.innerHTML = `
查询缓存...
`; + postToParent({ type: 'CHECK_IMAGE_CACHE', requestId, tags }); }); } + function handleImageResult(data) { const pending = pendingImages.get(data.requestId); if (!pending) return;