const sousuo = {
  state: {
    userInfo: {},
    statusBarHeight: {},
    cSearchText: '',
    refreshNum: 1
  },
  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
    },
    SET_REFRESH_NUM: (state, refreshNum) => {
      state.refreshNum = refreshNum
    }
  },
  actions: {
    setUserInfo({ commit }, userInfo) {
      commit('SET_USER_INFO', userInfo)
    },
    setStatusBarHeight({ commit }, statusBarHeight) {
      commit('SET_STATUS_BAR_HEIGHT', statusBarHeight)
    },
    setCSearchText({ commit }, cSearchText) {
      commit('SET_C_SEARCH_TEXT', cSearchText)
    },
    setRefreshNum({ commit }, refreshNum) {
      commit('SET_REFRESH_NUM', refreshNum)
    },
  }
}

export default sousuo
