You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
339 B
29 lines
339 B
4 years ago
|
const state = {
|
||
|
userInfo: {},
|
||
|
token: ""
|
||
|
}
|
||
|
|
||
|
const mutations = {
|
||
|
setToken(state, params) {
|
||
|
state.token = params;
|
||
|
},
|
||
|
setUserInfo(state, params) {
|
||
|
state.userInfo = params;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const getters = {
|
||
|
token(state) {
|
||
|
return state.token
|
||
|
},
|
||
|
userInfo(state) {
|
||
|
return state.userInfo
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default {
|
||
|
state,
|
||
|
mutations,
|
||
|
getters
|
||
|
}
|