From dfc9ff9b31aa23289984fdf037440020f90d1510 Mon Sep 17 00:00:00 2001 From: PanicNotPanic <935915822@qq.com> Date: Thu, 5 Jun 2025 21:40:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AB=A0=E8=8A=82=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E5=A4=9A=E5=BC=A0=E5=9B=BE=E7=89=87=E5=92=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=97=B6=EF=BC=8Cweb=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E4=B9=A6=E6=9E=B6=E4=B8=AD=E8=AF=BB=E4=B9=A6=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E6=B8=B2=E6=9F=93=E5=9B=BE=E7=89=87=20(#5125?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 17683954109@163.com <17683954109@163.com> --- modules/web/src/views/BookChapter.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/web/src/views/BookChapter.vue b/modules/web/src/views/BookChapter.vue index 966c6ac3a..4bc24f33a 100644 --- a/modules/web/src/views/BookChapter.vue +++ b/modules/web/src/views/BookChapter.vue @@ -305,6 +305,11 @@ const getContent = (index: number, reloadChapter = true, chapterPos = 0) => { if (res.data.isSuccess) { const data = res.data.data const content = data.split(/\n+/) + for (let i = 0; i < content.length; i++) { + if (!/^\s*]*src[^>]+>$/.test(content[i])) { + content[i] = content[i].replaceAll('img src="', `img src="/image?url=${bookUrl}&path=`); + } + } chapterData.value.push({ index, content, title }) if (reloadChapter) toChapterPos(chapterPos) } else {