diff --git a/modules/fourth-wall/fourth-wall.html b/modules/fourth-wall/fourth-wall.html index 4f5953da..b6bb403d 100644 --- a/modules/fourth-wall/fourth-wall.html +++ b/modules/fourth-wall/fourth-wall.html @@ -2184,13 +2184,14 @@

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 }); }); }