train.js 919 Bytes
import * as types from '../constants/ActionTypes'

const initialState = {
  getTrainVideoListData: [],
  getTrainVideoDetailData:{},
  getTrainListData:[],
  getTrainDetailData:[],


}

export default function environment(state = initialState, action) {
  switch (action.type) {
    case types.GETTRAINVIDEOLIST:
      return Object.assign({}, state, {
        getTrainVideoListData: action.getTrainVideoListData
      })
      break
    case types.GETTRAINVIDEODETAIL:
      return Object.assign({}, state, {
        getTrainVideoDetailData: action.getTrainVideoDetailData
      })
      break
    case types.GETTRAINLIST:
      return Object.assign({}, state, {
        getTrainListData: action.getTrainListData
      })
      break
    case types.GETTRAINDETAIL:
      return Object.assign({}, state, {
        getTrainDetailData: action.getTrainDetailData
      })
      break
    default:
      return state
  }
}