This commit is contained in:
2026-08-04 17:57:01 +08:00
parent 768fd4a3a9
commit f77034edd7
641 changed files with 26137 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
let baseURL = 'https://image.dnftools.com'
// 避免远程开发的时候冲突
if (process.env.NODE_ENV == 'development') {
baseURL = '/image'
}
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
}