import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user:{},
    site:0,
    isLogin:0,
    homePage:sessionStorage.getItem("Homepage") ? sessionStorage.getItem("Homepage") :true,

  },
  mutations: {
    HomePage(state,data){
      state.homePage=data;
    },
    updateSite(state, p) {
      state.site = p
    },
    changeLogin(state,data){
      state.isLogin = data;
    },
    updateUser(state,data){
      state.user = data;
    }
  },
  actions: {

  }
})
