import Vue from "vue"
import Vuex from "vuex"
import getters from './getters'

Vue.use(Vuex);

const store = new Vuex.Store({
	state:{
		token:'',
		info:'',
		htpUrl:'',
		projectItem:'',
		xmbm:'',
		xmmc:'',
		gclx:'',
		username:'',
		company:'',
		userId:''
	},
	mutations:{
		setTokenKey(state,token){
			state.token = token
		},
		setInfo(state,info){
			state.info = info
		},
		setHtpUrl(state,htpUrl){
			state.htpUrl = htpUrl
		},
		setProjectItem(state,projectItem){
			this.state.projectItem = projectItem;
		},
		setXmbm(state,xmbm){
			state.xmbm = xmbm
		},
		setXmmc(state,xmmc){
			state.xmmc = xmmc
		},
		setGclx(state,gclx){
			state.gclx = gclx
		},
		setUsername(state,username){
			state.username = username
		},
		setCompany(state,company){
			state.company = company
		},
		setUserId(state,userId){
			state.userId = userId
		}
	},
	getters
});
export default store;