realBack.js 872 Bytes
import * as types from '../constants/ActionTypes';

const initialState = {
  backRealList      :{},
  backPersonRealList:{},
  backTempList      :{},
  backAccountList   :{}
};

export default function environment(state = initialState,action) {
    switch(action.type) {
      case types.BACK_REAL_LIST:
        return Object.assign({}, state, {
          backRealList: action.backRealList
        });
      case types.BACK_PERSON_REAL_LIST:
        return Object.assign({}, state, {
          backPersonRealList: action.backPersonRealList
        });
      case types.BACK_TEMPLATE_LIST:
        return Object.assign({}, state, {
          backTempList: action.backTempList
        });
      case types.BACK_ACCOUNT_LIST:
        return Object.assign({}, state, {
          backAccountList: action.backAccountList
        });
      default:
        return state;
    }
}