From e98e842eff4b9b5fe081936279b04a3455ebc17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=85=B7=E5=8D=9A=E7=89=B9?= Date: Mon, 16 Mar 2026 12:06:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(Edit):=20=E4=BF=AE=E5=A4=8D=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E9=A1=B5=E9=9D=A2=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88?= =?UTF-8?q?=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 Edit.jsx 中图片预览路径 - 使用相对路径代替硬编码 URL - 与 Detail.jsx 保持一致 影响范围: - 编辑页面图片预览 - 图片上传后预览更新 --- frontend/index.html | 2 +- frontend/src/pages/Edit.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index d06f186..0e01b5f 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - 甲辰收藏 v1.0.0 + 甲辰收藏 v1.0.1 diff --git a/frontend/src/pages/Edit.jsx b/frontend/src/pages/Edit.jsx index 1abe321..396ee6f 100644 --- a/frontend/src/pages/Edit.jsx +++ b/frontend/src/pages/Edit.jsx @@ -123,7 +123,7 @@ export default function Edit() { if (data.images && Array.isArray(data.images)) { const images = data.images.map(img => ({ file: null, - preview: `http://120.26.133.10:3000/${img.path || `uploads/collections/${img.filename}`}`, + preview: `/${img.path || `uploads/collections/${img.filename}`}`, name: img.original_name || img.filename, size: 0, id: img.id @@ -182,7 +182,7 @@ export default function Edit() { if (data.images && Array.isArray(data.images)) { const images = data.images.map(img => ({ file: null, - preview: `http://120.26.133.10:3000/${img.path || `uploads/collections/${img.filename}`}`, + preview: `/${img.path || `uploads/collections/${img.filename}`}`, name: img.original_name || img.filename, size: 0, id: img.id