new UI and handle cashing
This commit is contained in:
+3
-2
@@ -1,4 +1,4 @@
|
||||
import { baseURL } from '@/themeConfig'
|
||||
import { resolveProjectBase } from '@/themeConfig'
|
||||
import type { User } from '@/models/login'
|
||||
|
||||
export interface ProductFile {
|
||||
@@ -19,7 +19,8 @@ export function getFileUrl(file?: ProductFile | null): string | null {
|
||||
const relative = file.src || file.full_src
|
||||
if (!relative) return null
|
||||
|
||||
const base = baseURL.replace(/\/$/, '')
|
||||
const base = resolveProjectBase().replace(/\/$/, '')
|
||||
if (!base) return relative.startsWith('/') ? relative : `/${relative}`
|
||||
const path = String(relative).replace(/^\//, '')
|
||||
return `${base}/${path}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user