diff --git a/core/core-frontend/src/store/modules/appearance.ts b/core/core-frontend/src/store/modules/appearance.ts index c8eebf32e9..6a2ad21b0c 100644 --- a/core/core-frontend/src/store/modules/appearance.ts +++ b/core/core-frontend/src/store/modules/appearance.ts @@ -5,8 +5,10 @@ import { uiLoadApi } from '@/api/login' import { useCache } from '@/hooks/web/useCache' import colorFunctions from 'less/lib/less/functions/color.js' import colorTree from 'less/lib/less/tree/color.js' +import { useEmbedded } from '@/store/modules/embedded' import { setTitle } from '@/utils/utils' +const embeddedStore = useEmbedded() const basePath = import.meta.env.VITE_API_BASEPATH const baseUrl = basePath + '/appearance/image/' import { isBtnShow } from '@/utils/utils' @@ -172,7 +174,9 @@ export const useAppearanceStore = defineStore('appearanceStore', { } fontStyleElement.innerHTML = `@font-face { font-family: '${name}'; - src: url(${basePath}/typeface/download/${currentFont.fileTransName}); + src: url(${ + embeddedStore.baseUrl ? embeddedStore.baseUrl : basePath + }/typeface/download/${currentFont.fileTransName}); font-weight: normal; font-style: normal; }`