diff --git a/src/views/App.jsx b/src/views/App.jsx index 0ff7fa7..4323b0e 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -15,6 +15,8 @@ import useNoticeStore from '@/stores/Notice'; import useAuthStore from '@/stores/Auth'; import { useThemeContext } from '@/stores/ThemeContext'; import { usingStorage } from '@/hooks/usingStorage'; +import { useDefaultLgc } from '@/i18n/LanguageSwitcher'; +import { appendRequestParams } from '@/utils/request' import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA, PERM_AIR_TICKET, PERM_PRODUCTS_MANAGEMENT } from '@/config'; @@ -63,9 +65,11 @@ function App() { defaultPath = splitPath[1] } + const { language } = useDefaultLgc(); const [antdLng, setAntdLng] = useState(enLocale); useEffect(() => { setAntdLng(i18n.language === 'en' ? enLocale : zhLocale); + appendRequestParams('lgc', language); }, [i18n.language]) return (