// 网络检测
export const UPDATE_NERWORK_TYPE = 'UPDATE_NERWORK_TYPE' // 网络状态更新
export default {
  state: {
    networkType: ''
  },
  actions: {
    [UPDATE_NERWORK_TYPE] ({ commit, state }, params) {
      commit(UPDATE_NERWORK_TYPE, params)
    }
  },
  mutations: {
    [UPDATE_NERWORK_TYPE] (state, data) {
      Object.assign(state, { networkType: data })
    }
  },
  getters: {
    networkType (state) {
      return state.networkType
    }
  }
}
