From 4aafa57b298b302451304bb562132768e6c36d14 Mon Sep 17 00:00:00 2001 From: liuxy0551 Date: Tue, 3 Dec 2024 16:56:58 +0800 Subject: [PATCH] fix: use remote img when dev --- app/web/pages/toolbox/components/uplodadLogo/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/web/pages/toolbox/components/uplodadLogo/index.tsx b/app/web/pages/toolbox/components/uplodadLogo/index.tsx index 70e3954..77fb806 100644 --- a/app/web/pages/toolbox/components/uplodadLogo/index.tsx +++ b/app/web/pages/toolbox/components/uplodadLogo/index.tsx @@ -15,7 +15,12 @@ function getBase64(img: any, callback: any) { const UploadLogo = (props: any) => { const { id, logoUrl } = props.tool; - const [imageUrl, setImageUrl] = useState(logoUrl ? '/' + logoUrl : undefined); + const [imageUrl, setImageUrl] = useState( + logoUrl + ? (process.env.NODE_ENV !== 'production' ? `http://172.16.100.225:7001/` : '/') + + logoUrl + : undefined + ); const [loading, setLoading] = useState(false); // 上传按钮