// #ifndef VUE3
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
// #endif

// #ifdef VUE3
import { createStore } from 'vuex'
const store = createStore({
// #endif
	state: {
		isLogin: false,
		userInfo: {},
		submitGoods: {}
	},
	mutations: {
		refreshUserLogin(state, isLogin) {
			state.isLogin = isLogin
		},
		refreshUserInfo(state, info) {
			state.userInfo = info
		},
		refreshSubmitGoods(state, info) {
			state.submitGoods = info
		}
	},
	getters: {
		
	},
	actions: {
		// 可以异步调用 coommit
	}
})

export default store
