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.

26 lines
458 B

import {USER_STATE} from "../api/enums.js"
3 years ago
export default {
state: {
userInfo: {
},
state: USER_STATE.FREE
3 years ago
},
mutations: {
setUserInfo(state, userInfo) {
// 切换用户后,清理缓存
if(userInfo.id != state.userInfo.id){
console.log("用户切换")
this.commit("resetChatStore");
}
state.userInfo = userInfo;
},
setUserState(state, userState) {
state.state = userState;
},
3 years ago
}
}