From 8b5589192d8aada6642dacdc237f263da77ad266 Mon Sep 17 00:00:00 2001 From: wangxiaogang <1433729587@qq.com> Date: Mon, 8 Jun 2026 11:04:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=85=AC=E5=91=8A=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5=20?= =?UTF-8?q?=E2=80=94=20=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - uploadImageIfNeeded 增加 notif_ 前缀判断 - 编辑保留原图时不再尝试上传本地文件 --- client/src/pages/admin/notifications.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/admin/notifications.vue b/client/src/pages/admin/notifications.vue index 510dd3a..2a966d9 100644 --- a/client/src/pages/admin/notifications.vue +++ b/client/src/pages/admin/notifications.vue @@ -299,8 +299,8 @@ function insertFormat(prefix: string, suffix: string) { /** 上传图片 */ async function uploadImageIfNeeded(imageUrl: string): Promise { if (!imageUrl) return '' - // 如果已经是完整 URL 或 blob URL,直接返回 - if (imageUrl.startsWith('http') || imageUrl.startsWith('blob:')) { + // 已经是服务器文件名(notif_ 开头)、完整 URL 或 blob URL,直接返回 + if (imageUrl.startsWith('notif_') || imageUrl.startsWith('http') || imageUrl.startsWith('blob:')) { return imageUrl } // 临时路径需要上传