This commit is contained in:
2026-05-11 00:32:03 +08:00
parent 2535bec2ed
commit 10022ae048
32 changed files with 2450 additions and 203 deletions
+19
View File
@@ -0,0 +1,19 @@
let baseURL = "https://image.dnftools.com";
// 避免远程开发的时候冲突
if (import.meta.env.MODE == "development") {
baseURL = "http://127.0.0.1:3000";
}
if (import.meta.env.MODE == "web" || import.meta.env.MODE == "show") {
baseURL = "https://image.dnftools.com";
}
export const getImageURL = (image: string) => {
image = image.startsWith("/") ? image : `/${image}`;
return `${baseURL}${image}`;
};
export const getLocalImageURL = (url: string) => {
return new URL(url, import.meta.url).href;
};