1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| import { reactive, inject } from 'vue';
|
| export const globalState = reactive({
| url: 'http://127.0.0.1:8081/wms',
| token: '',
| user: null,
| locale: 'zhCN',
| currentHost: null,
| });
|
| export const logout = () => {
| globalState.token = null;
| globalState.user = null;
| globalState.currentHost = null;
| localStorage.removeItem('token')
| localStorage.removeItem('user')
|
| }
|
|