diff --git a/servers/tools-pve/wechat-fulltext/app/service.mjs b/servers/tools-pve/wechat-fulltext/app/service.mjs index e14339a..aded3b9 100644 --- a/servers/tools-pve/wechat-fulltext/app/service.mjs +++ b/servers/tools-pve/wechat-fulltext/app/service.mjs @@ -65,7 +65,15 @@ async function readJson(path) { async function cachedResult(id) { try { const result = await readJson(join(articlesDirectory, id, 'result.json')); - return result.status === 'completed' ? result : null; + if (result.status !== 'completed') return null; + const marker = `/v1/articles/${id}/files/`; + for (const field of ['markdown_url', 'pdf_url', 'html_url', 'manifest_url']) { + const value = String(result[field] || ''); + const markerIndex = value.indexOf(marker); + if (markerIndex >= 0) result[field] = `${publicBaseUrl}${value.slice(markerIndex)}`; + } + result.status_url = statusUrl(id); + return result; } catch { return null; }