|
|
@@ -22,7 +22,7 @@ export default class PaymentWeb extends Component {
|
|
|
}
|
|
|
};
|
|
|
this.canBack = false;
|
|
|
- this.stateListener;
|
|
|
+ this.stateListener = undefined;
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
@@ -34,12 +34,14 @@ export default class PaymentWeb extends Component {
|
|
|
paymentInfo: param
|
|
|
}, () => this.init());
|
|
|
}
|
|
|
- this.stateListener = AppState.addEventListener("change", state => {
|
|
|
- if (state == 'active' && this.state.isCallback) {
|
|
|
- //console.log("AppState", state);
|
|
|
- this.completePayment();
|
|
|
- }
|
|
|
- });
|
|
|
+ if (!PaymentDefault.enableInnerWebView) {
|
|
|
+ this.stateListener = AppState.addEventListener("change", state => {
|
|
|
+ if (state == 'active' && this.state.isCallback) {
|
|
|
+ //console.log("AppState", state);
|
|
|
+ this.completePayment();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
/*this.props.navigation.addListener('beforeRemove', e => {
|
|
|
if (!this.canBack) {
|
|
|
if (this.state.isRepay) {
|