#
Junjie
2024-07-03 b334ee72afc23ead7f0cd5efc9a1343f7ceaae90
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')
 
}