personSocial.js 3.3 KB
import * as types from '../constants/ActionTypes';

const initialState = {
  personSocialList    :{},
  personAreaSocialList:{},
  personSocial      :{},
  personSocialDel   :{},
  orderList         :{},
  socialOrderDetail :{},
  personDetail      :{},
  policyArea        :[],
  personPolicyHhr   :[],
  orderCalcDetail   :[],
  orderDeadline     :{},
  siServiceFee      :{},
  hfServiceFee      :{},
  psiRangmonth      :{},
  personSiStatistic :{},
  personReminderDet :{}
};

export default function environment(state = initialState, action) {
    switch (action.type) {
      case types.PERSON_REMINNDER_DET:
          return Object.assign({}, state, {
              personReminderDet: action.personReminderDet
          });
          break;
      case types.PERSON_STATISTIC_COMMENT:
          return Object.assign({}, state, {
              personStatisticComment: action.personStatisticComment
          });
          break;
      case types.PERSON_SI_STATISTIC:
          return Object.assign({}, state, {
              personSiStatistic: action.personSiStatistic
          });
          break;
      case types.PSI_PAYBACK_RANGEMONTH:
          return Object.assign({}, state, {
              psiRangmonth: action.psiRangmonth
          });
          break;
      case types.HF_SERVICE_FEE:
          return Object.assign({}, state, {
              hfServiceFee: action.hfServiceFee
          });
          break;
      case types.SI_SERVICE_FEE:
          return Object.assign({}, state, {
              siServiceFee: action.siServiceFee
          });
          break;
      case types.ORDER_DEADLINE:
          return Object.assign({}, state, {
              orderDeadline: action.orderDeadline
          });
          break;
      case types.ORDER_CALC_DETAIL:
          return Object.assign({}, state, {
              orderCalcDetail: action.orderCalcDetail
          });
          break;
      case types.PERSON_POLICY_HHR:
          return Object.assign({}, state, {
              personPolicyHhr: action.personPolicyHhr
          });
          break;
      case types.POLICY_AREA:
          return Object.assign({}, state, {
              policyArea: action.policyArea
          });
          break;
      case types.GET_PERSON_SOCIAL:
          return Object.assign({}, state, {
              personSocialList: action.personSocialList
          });
          break;
      case types.GET_AREA_PERSON_SOCIAL:
          return Object.assign({}, state, {
              personAreaSocialList: action.personAreaSocialList
          });
          break;
      case types.ADD_PERSON_SOCIAL:
          return Object.assign({}, state, {
              personSocial: action.personSocial
          });
          break;
      case types.GET_PERSON_SOCIAL_DEL:
          return Object.assign({}, state, {
              personSocialDel: action.personSocialDel
          });
          break;
      case types.GET_ORDERS:
          return Object.assign({}, state, {
              orderList: action.orderList
          });
          break;
      case types.SOCIAL_ORDER_DETAIL:
          return Object.assign({}, state, {
              socialOrderDetail: action.socialOrderDetail
          });
          break;
      case types.PERSON_DETAIL:
          return Object.assign({}, state, {
              personDetail: action.personDetail
          });
          break;
        default:
          return state;
    }
}