const sousuo = {
  state: {
    userInfo: {},
    statusBarHeight: {},
    cSearchText: '',
  },
  mutations: {
    SET_USER_INFO: (state, userInfo) => {
      state.userInfo = userInfo
    },
    SET_STATUS_BAR_HEIGHT: (state, statusBarHeight) => {
      state.statusBarHeight = statusBarHeight
    },
    SET_C_SEARCH_TEXT: (state, cSearchText) => {
      state.cSearchText = cSearchText
    }
  },
  actions: {
    setUserInfo({ commit }, userInfo) {
      commit('SET_USER_INFO', userInfo)
    },
    setStatusBarHeight({ commit }, statusBarHeight) {
      commit('SET_STATUS_BAR_HEIGHT', statusBarHeight)
    },
    setCSearchText({ commit }, cSearchText) {
      console.log('setCSearchText cSearchText', cSearchText)
      commit('SET_C_SEARCH_TEXT', cSearchText)
    },
  }
}

export default sousuo
