From 31abdfefea67718446d648b89911edfff0e60c46 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 9 Aug 2024 13:48:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=AD=E7=A7=8D=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/App.jsx | 4 ++++ 1 file changed, 4 insertions(+) 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 (