/**
 * Created by supervisor on 2017/11/3.
 */
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const state={
  isloading:false,
  token: "",
  isAdmin: true,
  isOpen: false,
  isLeave:true, //默认离开
}
const mutations={
  UPDATE_LOADING(state, isloading){
    state.isloading=isloading;
  },
  setToken(state, token){
    state.token = token;
  },
  isAdminInfo(state, isAdmin){
    state.isAdmin = isAdmin;
  },
  setIsOpen(state, isOpen){
    state.isOpen = isOpen
  },
  setLeave(state,isLeave){
    state.isLeave = isLeave
  }
}
export default  new Vuex.Store({
  state,
  mutations
})
