UNPKG

para-bridge-demo

Version:

a bridge api for js-ios/andriod rest

30 lines (23 loc) 765 B
``` tsx public componentDidMount() { this.setState({ newUrl: 'https://www.baidu.com?ntv_webview_history&page=1#/home', newWindowUrl: 'https://www.baidu.com?ntv_webview_history&ntv_login&page=1#/home', }); } private navBack = () => { setWebviewBack(1); } private openNewUrl = () => { openNewUrl('https://www.baidu.com?ntv_webview_history&page=1#/home'); } private openNewUrlWithlogin = () => { openNewUrl('https://www.baidu.com?ntv_webview_history&ntv_login&page=1#/home'); } private openFromLocation = () => { window.location.href = 'https://www.baidu.com?ntv_webview_history&page=1#/home'; } private openFromNewLocationWithlogin = () => { window.location.href = 'https://www.baidu.com?ntv_webview_history&ntv_login&page=1#/home'; } ```