const sousuo = {
  state: {
    userInfo: {},
    statusBarHeight: {},
    cSearchText: '',
    refreshNum: 1,
    orderNum: 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
    },
    SET_ORDER_NUM: (state, orderNum) => {
      state.orderNum = orderNum
    },
  },
  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)
    },
    setOrderNum({ commit }, orderNum) {
      commit('SET_ORDER_NUM', orderNum)
    },
  }
}

export default sousuo
