|
@@ -11,10 +11,16 @@
|
|
|
import { AppProvider } from '/@/components/Application';
|
|
|
import { useTitle } from '/@/hooks/web/useTitle';
|
|
|
import { useLocale } from '/@/locales/useLocale';
|
|
|
+ import { useUserStoreWithOut } from '/@/store/modules/user';
|
|
|
|
|
|
// support Multi-language
|
|
|
const { getAntdLocale } = useLocale();
|
|
|
-
|
|
|
+ let token = localStorage.getItem('token');
|
|
|
+ if (token) {
|
|
|
+ const userStore = useUserStoreWithOut();
|
|
|
+ userStore.setToken(token);
|
|
|
+ // localStorage.removeItem('token');
|
|
|
+ }
|
|
|
// Listening to page changes and dynamically changing site titles
|
|
|
useTitle();
|
|
|
</script>
|