para-bridge-demo
Version:
a bridge api for js-ios/andriod rest
45 lines (43 loc) • 1.03 kB
Markdown
``` tsx
private urlRefresh = () => {
const hash = window.location.hash.replace('#', '');
window.location.href = this.getHostUrl(hash, {
r: this.state.random,
});
}
private urlForceLoginWithNewWebview = () => {
this.setState({
random: Math.random(),
}, () => {
const hash = window.location.hash.replace('#', '');
const redirect = this.getHostUrl(hash, {
ntv_login: '',
ntv_webview_new: '',
r: this.state.random,
});
Dialog.confirm({
children: <div>{redirect}</div>,
onRight: () => {
window.location.href = redirect;
},
}, true);
});
}
private urlForceLogin = () => {
this.setState({
random: Math.random(),
}, () => {
const hash = window.location.hash.replace('#', '');
const redirect = this.getHostUrl(hash, {
ntv_login: '',
r: this.state.random,
});
Dialog.confirm({
children: <div>{redirect}</div>,
onRight: () => {
window.location.href = redirect;
},
}, true);
});
}
```