mirror of
https://github.com/timepill/timepill-app.git
synced 2025-04-30 09:59:31 +08:00
修复欢迎页android无法通过物理键后退的问题
This commit is contained in:
parent
fcf86bc1aa
commit
0c02b59a89
1 changed files with 3 additions and 3 deletions
|
@ -59,18 +59,18 @@ export default class WebViewPage extends Component {
|
||||||
|
|
||||||
} else if(buttonId == 'open') {
|
} else if(buttonId == 'open') {
|
||||||
Linking.openURL(this.webViewState.url);
|
Linking.openURL(this.webViewState.url);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack = () => {
|
||||||
if (this.webViewState.canGoBack) {
|
if (this.webViewState.canGoBack) {
|
||||||
this.webView.injectJavaScript('window.history.back();');
|
this.webView.injectJavaScript('window.history.back();');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Navigation.pop(this.props.componentId);
|
Navigation.pop(this.props.componentId);
|
||||||
}
|
}
|
||||||
}
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
onNavigationStateChange(event) {
|
onNavigationStateChange(event) {
|
||||||
this.webViewState = event;
|
this.webViewState = event;
|
||||||
|
|
Loading…
Reference in a new issue