const state = {
  token: '',
  userInfo: {
	  account: '',
	  name: '',
	  jobNo: '',
	  roleKey: '',
	  isBindFace: '',
	  station: '',
	  color: '',
	  opreates: ''
  }
};

const mutations = {
  SET_TOKEN: (state, token) => {
    state.token = token;
  },
  SET_USERINFO: (state, userInfo) => {
	  state.userInfo = userInfo
  }
};

const actions = {
  setToken({ commit }, token) {
    commit("SET_TOKEN", token);
  },
  setUserInfo({ commit }, userInfo) {
    commit("SET_USERINFO", userInfo);
  }
};

export default {
  namespaced: true,
  state,
  mutations,
  actions
};