import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ state:{ userInfo:{}, token:"", }, getters:{ userInfo: state=>state.userInfo, token: state=>state.token, }, mutations:{ setUserInfo(state, val){ state.userInfo=val.userInfo state.token=val.token } }, actions:{ } })