图片路径修改

This commit is contained in:
weiwei committed 2025-04-03 18:54:39 +08:00
1 parent b894e9d5d2
commit 07235041ad
3 files changed
+63 -60

No files matched your search

+6 -4
View File
@@ -1,5 +1,7 @@
import isDevEnv from "./isDevEnv"
export const filePath = (path?: string) => {
const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH;
if (!path) return "";
return imageBaseUrl + path;
};
const imageBaseUrl = isDevEnv() ? import.meta.env.VITE_IMAGE_DEV_PATH : import.meta.env.VITE_APP_PROD_IMAGE
if (!path) return ""
return imageBaseUrl + path
}