fix(Edit): 修复编辑页面图片预览 URL
- 修复 Edit.jsx 中图片预览路径 - 使用相对路径代替硬编码 URL - 与 Detail.jsx 保持一致 影响范围: - 编辑页面图片预览 - 图片上传后预览更新
This commit is contained in:
parent
c834a8f835
commit
e98e842eff
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>甲辰收藏 v1.0.0</title>
|
||||
<title>甲辰收藏 v1.0.1</title>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/x-icon" href="/static/icons/favicon.ico" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue