feat: add base path to resources (#17655)

Co-authored-by: fhliu4 <fhliu4@iflytek.com>
This commit is contained in:
diuwu
2025-04-15 17:05:50 +08:00
committed by GitHub
parent 12de1d175c
commit 7161d7ad96
30 changed files with 146 additions and 38 deletions

View File

@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'
import { Menu, MenuButton, MenuItems, Transition } from '@headlessui/react'
import { RiArrowDownSLine } from '@remixicon/react'
import cn from '@/utils/classnames'
import { basePath } from '@/utils/var'
import PlanBadge from '@/app/components/header/plan-badge'
import { switchWorkspace } from '@/service/common'
import { useWorkspacesContext } from '@/context/workspace-context'
@@ -22,7 +23,7 @@ const WorkplaceSelector = () => {
return
await switchWorkspace({ url: '/workspaces/switch', body: { tenant_id } })
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
location.assign(`${location.origin}`)
location.assign(`${location.origin}${basePath}`)
}
catch {
notify({ type: 'error', message: t('common.provider.saveFailed') })