const defaultState = {}

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

export default user