完善馆内点位展示与微信地图桥接
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-19 16:01:32 +08:00
parent 127461dd60
commit d199b4602f
10 changed files with 780 additions and 334 deletions

View File

@@ -44,6 +44,9 @@ import type {
import {
guideRepository
} from '@/repositories/createGuideRepository'
import {
normalizeSameOriginPublicUrl
} from '@/utils/publicUrl'
const SDK_FLOOR_BUNDLE_CONCURRENCY = 2
@@ -135,21 +138,7 @@ const resolveSgsAssetUrl = (url?: string | null) => {
if (!normalizedUrl) return ''
if (/^https?:\/\//i.test(normalizedUrl)) {
try {
const assetUrl = new URL(normalizedUrl)
if (
dataSourceConfig.publicSameOriginAssetHost
&& assetUrl.hostname === dataSourceConfig.publicSameOriginAssetHost
&& assetUrl.port === '9000'
&& assetUrl.pathname.startsWith('/museum-assets/')
) {
return `${assetUrl.pathname}${assetUrl.search}${assetUrl.hash}`
}
} catch {
return normalizedUrl
}
return normalizedUrl
return normalizeSameOriginPublicUrl(normalizedUrl)
}
if (!normalizedUrl.startsWith('/')) return normalizedUrl