...
|
...
|
@@ -17,6 +17,8 @@ import {connect} from 'react-redux'; |
|
|
import {Map} from 'immutable';
|
|
|
import * as userLogoutActions from '../reducers/userLogout/userLogoutActions';
|
|
|
import UserLogout from '../components/userLogout/UserLogout';
|
|
|
import UserLogoutFaild from '../components/userLogout/UserLogoutFaild';
|
|
|
import UserLogoutStatus from '../components/userLogout/UserLogoutStatus';
|
|
|
|
|
|
const actions = [
|
|
|
userLogoutActions,
|
...
|
...
|
@@ -47,10 +49,12 @@ class UserLogoutContainer extends Component { |
|
|
this._onPressLogoutClause = this._onPressLogoutClause.bind(this);
|
|
|
this._confirmLogoutAction = this._confirmLogoutAction.bind(this);
|
|
|
this._updateLogoutModalState = this._updateLogoutModalState.bind(this);
|
|
|
this._gotoLogoutFaildReason = this._gotoLogoutFaildReason.bind(this);
|
|
|
this._gotoLogoutReason = this._gotoLogoutReason.bind(this);
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
this.props.actions.checkUserLogedIn();
|
|
|
}
|
|
|
|
|
|
componentWillUnmount() {
|
...
|
...
|
@@ -69,16 +73,39 @@ class UserLogoutContainer extends Component { |
|
|
this.props.actions.updateLogoutModalState(flag);
|
|
|
}
|
|
|
|
|
|
_gotoLogoutFaildReason(){
|
|
|
this.props.actions.gotoLogoutFaildReason()
|
|
|
}
|
|
|
|
|
|
_gotoLogoutReason(){
|
|
|
this.props.actions.gotoLogoutReason()
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
let {showConfirmLogoutModal} = this.props.userLogout;
|
|
|
return (
|
|
|
<UserLogout
|
|
|
showConfirmLogoutModal = {showConfirmLogoutModal}
|
|
|
onPressLogoutClause = {this._onPressLogoutClause}
|
|
|
confirmLogoutAction = {this._confirmLogoutAction}
|
|
|
updateLogoutModalState = {this._updateLogoutModalState}
|
|
|
/>
|
|
|
);
|
|
|
let {showConfirmLogoutModal, logoutStatus} = this.props.userLogout;
|
|
|
if (logoutStatus == 0) {
|
|
|
return (
|
|
|
<UserLogout
|
|
|
showConfirmLogoutModal = {showConfirmLogoutModal}
|
|
|
onPressLogoutClause = {this._onPressLogoutClause}
|
|
|
confirmLogoutAction = {this._confirmLogoutAction}
|
|
|
updateLogoutModalState = {this._updateLogoutModalState}
|
|
|
/>
|
|
|
);
|
|
|
} else if(logoutStatus == 1){
|
|
|
return (
|
|
|
<UserLogoutStatus
|
|
|
/>
|
|
|
);
|
|
|
}else if(logoutStatus == 3){
|
|
|
return (
|
|
|
<UserLogoutFaild
|
|
|
isFaildReasonPage={false}
|
|
|
gotoLogoutFaildReason={this._gotoLogoutFaildReason}
|
|
|
gotoLogoutReason={this._gotoLogoutReason}
|
|
|
/>
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|