|
|
'use strict'
|
|
|
|
|
|
import React, {Component} from "react";
|
|
|
import {StyleSheet, View, NativeModules, DeviceEventEmitter} from "react-native";
|
|
|
import ReactNative, {StyleSheet, View, NativeModules, DeviceEventEmitter} from "react-native";
|
|
|
import {bindActionCreators} from "redux";
|
|
|
import {connect} from "react-redux";
|
|
|
import {Map} from "immutable";
|
|
|
import TimerMixin from 'react-timer-mixin';
|
|
|
|
|
|
import * as allianceActions from '../reducers/alliance/allianceActions';
|
|
|
|
...
|
...
|
@@ -48,7 +49,7 @@ class NameAuthenContainer extends Component { |
|
|
}
|
|
|
|
|
|
componentWillUnmount() {
|
|
|
|
|
|
this.timer && TimerMixin.clearTimeout(this.timer);
|
|
|
}
|
|
|
|
|
|
showLoading(show){
|
...
|
...
|
@@ -83,7 +84,15 @@ class NameAuthenContainer extends Component { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
this.props.actions.bindIdentityCard(cardFrontUrl, cardBackUrl);
|
|
|
this.props.actions.bindIdentityCard(cardFrontUrl, cardBackUrl, (json) => {
|
|
|
|
|
|
this.timer = TimerMixin.setTimeout(() => {
|
|
|
ReactNative.NativeModules.YH_CommonHelper.goBack();
|
|
|
//绑定成功后更新绑定状态
|
|
|
DeviceEventEmitter.emit('IdentityCardBindSuccessEvent');
|
|
|
}, 1000);
|
|
|
|
|
|
});
|
|
|
})
|
|
|
.catch(error => {
|
|
|
this.showLoading(false);
|
...
|
...
|
|