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.
|
|
|
const state = {
|
|
|
|
userInfo: {},
|
|
|
|
token: "",
|
|
|
|
refreshToken: ""
|
|
|
|
}
|
|
|
|
|
|
|
|
const mutations = {
|
|
|
|
setToken(state, params) {
|
|
|
|
state.token = params;
|
|
|
|
},
|
|
|
|
setUserInfo(state, params) {
|
|
|
|
state.userInfo = params;
|
|
|
|
},
|
|
|
|
setRefreshToken(state, params) {
|
|
|
|
state.refreshToken = params;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const getters = {
|
|
|
|
token(state) {
|
|
|
|
return state.token
|
|
|
|
},
|
|
|
|
userInfo(state) {
|
|
|
|
return state.userInfo
|
|
|
|
},
|
|
|
|
refreshToken(state) {
|
|
|
|
return state.refreshToken;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
state,
|
|
|
|
mutations,
|
|
|
|
getters
|
|
|
|
}
|