import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = () => new Vuex.Store({
  state: {
    isPC: -1,
    userinfo: {},
  },
  mutations: {
    updateUserinfo(state, payload) {
      state.userinfo = payload.userinfo
    },
    updateIsPC(state, payload) {
      state.isPC = payload.isPC
    }
  }
})

export default store