new UI and handle cashing

This commit is contained in:
2026-06-16 19:47:28 +03:30
parent e174ae28c5
commit 6e5ea0319f
41 changed files with 2936 additions and 641 deletions
+3 -2
View File
@@ -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}`
}