// #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: {},
		selectAccount: false,
		setPwdSuccess: false
	},
	mutations: {
		refreshUserLogin(state, isLogin) {
			state.isLogin = isLogin
		},
		refreshUserInfo(state, info) {
			state.userInfo = info
		},
		refreshSubmitGoods(state, info) {
			state.submitGoods = info
		},
		refreshSelectAccount(state, value) {
			state.selectAccount = value
		},
		refreshSetPwdSuccess(state, value) {
			state.setPwdSuccess = value
		}
	},
	getters: {
		
	},
	actions: {
		// 可以异步调用 coommit
	}
})

export default store
