fix(系统设置): i18n
This commit is contained in:
parent
452ae34948
commit
abbae8bd05
|
@ -57,6 +57,12 @@ instance.interceptors.request.use(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
let language = localStorage.getItem('language');
|
||||||
|
if (!language) {
|
||||||
|
language = navigator.language || navigator.browserLanguage;
|
||||||
|
}
|
||||||
|
instance.defaults.headers.common['Accept-Language'] = language;
|
||||||
|
|
||||||
function clearLocalStorage() {
|
function clearLocalStorage() {
|
||||||
localStorage.removeItem(TokenKey);
|
localStorage.removeItem(TokenKey);
|
||||||
sessionStorage.removeItem(WORKSPACE_ID);
|
sessionStorage.removeItem(WORKSPACE_ID);
|
||||||
|
|
Loading…
Reference in New Issue