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

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
      userinfo:'',
      banners:[],
      cart:[]
  },
  mutations: {
      UPDATE_LOGIN_INFO(state,param){
         state.userinfo = param;
      },
      UPDATE_BANNER(state,param){
          state.banners = param;
      },
      ADD_CART(state,param){
          state.cart.push(param);
      },
      LOGOUT(state,param){
          state.userinfo = '';
      }
  },
  actions: {

  }
})
