...
|
...
|
@@ -71,17 +71,35 @@ export default class UserLogoutReason extends Component { |
|
|
if (this.state.resendBtnText !== '获取') {
|
|
|
return;
|
|
|
}else {
|
|
|
this.setState({
|
|
|
countDown: 60,
|
|
|
tickTimeOut: false,
|
|
|
resendBtnText: '59s',
|
|
|
});
|
|
|
this._startTimer();
|
|
|
var degrees = this.state.image0Degree + ',' + this.state.image1Degree + ',' + this.state.image2Degree + ',' + this.state.image3Degree;
|
|
|
this.props.fetchCanleCode && this.props.fetchCanleCode(this.state.mobile, degrees)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
if(nextProps.succeedSendCode != this.props.succeedSendCode) {
|
|
|
try {
|
|
|
if (nextProps.succeedSendCode) {
|
|
|
if (this.state.resendBtnText !== '获取') {
|
|
|
return;
|
|
|
}else {
|
|
|
this.setState({
|
|
|
countDown: 60,
|
|
|
tickTimeOut: false,
|
|
|
resendBtnText: '59s',
|
|
|
});
|
|
|
this._startTimer();
|
|
|
}
|
|
|
}
|
|
|
} catch (e) {
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
render() {
|
|
|
let {imageCheckCodeUrl}=this.props;
|
|
|
return (
|
...
|
...
|
@@ -104,7 +122,14 @@ export default class UserLogoutReason extends Component { |
|
|
<TouchableOpacity
|
|
|
activeOpacity={0.8}
|
|
|
onPress={() => {
|
|
|
this.props.showLogoutReasonModalAction && this.props.showLogoutReasonModalAction(true)
|
|
|
if(this.props.submitBtnEnable){
|
|
|
this.props.showLogoutReasonModalAction && this.props.showLogoutReasonModalAction(true)
|
|
|
this.setState({
|
|
|
countDown: 60,
|
|
|
tickTimeOut: true,
|
|
|
resendBtnText: '获取',
|
|
|
});
|
|
|
}
|
|
|
}}>
|
|
|
<View style={[styles.submitBtn,{backgroundColor:this.props.submitBtnEnable?'#444444':'#b0b0b0'}]}>
|
|
|
<Text style={styles.submitText}>提交</Text>
|
...
|
...
|
@@ -122,6 +147,11 @@ export default class UserLogoutReason extends Component { |
|
|
style={{width:width,height:height, flex: 1, justifyContent: 'center'}}
|
|
|
onPress={() => {
|
|
|
this.props.showLogoutReasonModalAction && this.props.showLogoutReasonModalAction(false)
|
|
|
this.setState({
|
|
|
countDown: 60,
|
|
|
tickTimeOut: true,
|
|
|
resendBtnText: '获取',
|
|
|
});
|
|
|
}}>
|
|
|
<View style={styles.modalView}>
|
|
|
<View style={{marginTop:15,marginBottom:15}}>
|
...
|
...
|
|