const user = (state = {}, action) => { // 写入各种action对应的操作 switch (action.type) { case 'SET_USER_ACCOUNT': const _state = { ...state, ...action.user } return _state default: return state } } export default user