const data = {
    state: {
        hasLogin: false,
		userInfo:{},
		is_bind:false,
		configList:[],
		filedList:[],
		org:{}
    },
	getters:{
		getHasLogin(state,getters){
			return state.hasLogin
		},
		getUserInfo(state,getters){
			return state.userInfo
		},
		getBind(state,getters){
			return state.is_bind
		},
		getConfigList(state,getters){
			return state.configList
		}
	},
    mutations: {
		setHasLogin(state, newState){
			state.is_bind = newState.is_bind
			state.userInfo = newState.userInfo
			state.hasLogin = true
			console.log('state.is_bind',state.is_bind)
			uni.setStorageSync('userInfo',newState)
		},
		setIsBand(state, newState){
			state.is_bind = newState.is_bind
			state.userInfo = newState.userInfo
		},
		setLogout(state){
			state.userInfo = {}
			state.hasLogin = false
			state.is_bind = false
			uni.clearStorageSync('userInfo')
		},
		setConfigList(state, newState){
			state.configList = newState.configList
		},
		setFiledList(state, newState){
			state.filedList = newState.filedList
		},
		setOrg(state, newState){
			state.org = newState.org
		},
    },
    actions: { // 使用actions，通过mutations更改state的值
        // handleSetNum2({ commit }, data) {
        //     commit('setNum2', data)
        // }
    }
}
export default data