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

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    coureLogin: uni.getStorageSync('coureLogin') || 0,
  },
  mutations: {
    setCoureLogin(state, payload) {
    	uni.setStorageSync('coureLogin', payload);
    	state.coureLogin = payload;
    }
  },
  actions: {
  },
  getters: {
    coureLogin: (state) => state.coureLogin,
  }
})

export default store