|
|
@ -15,6 +15,8 @@ import useNoticeStore from '@/stores/Notice';
|
|
|
|
import useAuthStore from '@/stores/Auth';
|
|
|
|
import useAuthStore from '@/stores/Auth';
|
|
|
|
import { useThemeContext } from '@/stores/ThemeContext';
|
|
|
|
import { useThemeContext } from '@/stores/ThemeContext';
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
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';
|
|
|
|
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]
|
|
|
|
defaultPath = splitPath[1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { language } = useDefaultLgc();
|
|
|
|
const [antdLng, setAntdLng] = useState(enLocale);
|
|
|
|
const [antdLng, setAntdLng] = useState(enLocale);
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
setAntdLng(i18n.language === 'en' ? enLocale : zhLocale);
|
|
|
|
setAntdLng(i18n.language === 'en' ? enLocale : zhLocale);
|
|
|
|
|
|
|
|
appendRequestParams('lgc', language);
|
|
|
|
}, [i18n.language])
|
|
|
|
}, [i18n.language])
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|