const sousuo = {
  state: {
    userInfo: {},
    navBarHeight: {},
    cSearchText: ''
  },
  mutations: {
    SET_USER_INFO: (state, userInfo) => {
    	console.log(state, userInfo);
      state.userInfo = userInfo
    },
    SET_NAVBAR_HEIGHT: (state, navBarHeight) => {
    	console.log(state, navBarHeight);
      state.navBarHeight = navBarHeight
    },
    SET_C_SEARCH_TEXT: (state, cSearchText) => {
      console.log('SET_C_SEARCH_TEXT cSearchText', cSearchText)
      state.cSearchText = cSearchText
    }
  },
  actions: {
    setUserInfo({ commit }, userInfo) {
      commit('SET_USER_INFO', userInfo)
    },
    setNavBarHeight({ commit }, navBarHeight) {
      commit('SET_NAVBAR_HEIGHT', navBarHeight)
    },
    setCSearchText({ commit }, cSearchText) {
      console.log('setCSearchText cSearchText', cSearchText)
      commit('SET_C_SEARCH_TEXT', cSearchText)
    },
  }
}

export default sousuo
