userLogoutReasonReducer.js
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* sub app userLogout
* @author: lixia.zhang
* @date: 2018/04/13
*/
'use strict';
import InitialState from './userLogoutReasonInitialState';
import Immutable, {Map} from 'immutable';
const {
ENABLE_SUBMIT_BTN,
SHOW_LOGOUT_REASON_MODAL,
SET_IMAGE_CHECK_SWITCH_STATE,
IMAGE_CHECK_CODE_URL,
UPDATE_TIP_MESSAGE,
SUCCEED_SEND_CODE_STATUE
} = require('../../constants/actionTypes').default;
const initialState = new InitialState;
export default function userLogoutReasonReducer(state = initialState, action) {
switch(action.type) {
case ENABLE_SUBMIT_BTN:{
return state.set('submitBtnEnable',action.payload);
}
case SHOW_LOGOUT_REASON_MODAL: {
return state.set('showModalFlag',action.payload);
}
case SET_IMAGE_CHECK_SWITCH_STATE: {
return state.set('imageCheckSwitchState',action.payload);
}
case IMAGE_CHECK_CODE_URL: {
return state.set('imageCheckCodeUrl',action.payload);
}
case UPDATE_TIP_MESSAGE: {
return state.set('tipMeaasge', action.payload);
}
case SUCCEED_SEND_CODE_STATUE: {
return state.set('succeedSendCode', action.payload);
}
}
return state;
}