Skip to content

Commit 4aafa57

Browse files
committed
fix: use remote img when dev
1 parent 39dfecf commit 4aafa57

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/web/pages/toolbox/components/uplodadLogo/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ function getBase64(img: any, callback: any) {
1515

1616
const UploadLogo = (props: any) => {
1717
const { id, logoUrl } = props.tool;
18-
const [imageUrl, setImageUrl] = useState(logoUrl ? '/' + logoUrl : undefined);
18+
const [imageUrl, setImageUrl] = useState(
19+
logoUrl
20+
? (process.env.NODE_ENV !== 'production' ? `http://172.16.100.225:7001/` : '/') +
21+
logoUrl
22+
: undefined
23+
);
1924
const [loading, setLoading] = useState(false);
2025

2126
// 上传按钮

0 commit comments

Comments
 (0)