const state = {
  userName: '',
  testName: ''
};
const mutations = {
  SET_USER_NAME(state, name) {
    state.userName = name;
    window.localStorage['userName'] = name;
  },
  SET_USER_TEST_NAME(state, name) {
    state.testName = name;
    window.localStorage['testName'] = name;
  }
};
const actions = {
  // 设置name
  setUserName({ commit }, name) {
    commit('SET_USER_NAME', name);
  },
  setTestName({ commit }, name) {
    commit('SET_USER_TEST_NAME', name);
  }
};
export default {
  state,
  mutations,
  actions
};
