import Vue from 'vue'
import Vuex from 'vuex'
import {getCache,setCache} from '@/api/auth';
Vue.use(Vuex)

export default new Vuex.Store({
	state: {
		config: {}
	},
	getters:{
		 config: state => state.config,
	},
	mutations: {
		CONFING: (state, data) => {
			state.config = data
			setCache('siteConfig',data)
		},
	},
	actions: {
		setConfig({commit}, data) {
			commit('CONFING', data);
		},
	},
})
