You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.5 KiB
40 lines
1.5 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no" />
|
|
<title>廓形仪</title>
|
|
</head>
|
|
<body>
|
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
<div id="root"></div>
|
|
|
|
<script>
|
|
function setupWebViewJavascriptBridge(callback) {
|
|
if (window.WebViewJavascriptBridge) { return callback(WebViewJavascriptBridge); }
|
|
if (/android/i.test(navigator.userAgent)) {
|
|
document.addEventListener('WebViewJavascriptBridgeReady',function(){ callback(WebViewJavascriptBridge) },false);
|
|
}
|
|
else {
|
|
if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); }
|
|
window.WVJBCallbacks = [callback];
|
|
var WVJBIframe = document.createElement('iframe');
|
|
WVJBIframe.style.display = 'none';
|
|
WVJBIframe.src = 'https://__bridge_loaded__';
|
|
document.documentElement.appendChild(WVJBIframe);
|
|
setTimeout(function() { document.documentElement.removeChild(WVJBIframe) }, 0)
|
|
}
|
|
}
|
|
setupWebViewJavascriptBridge(function(bridge) {
|
|
window.bridge = bridge;
|
|
});
|
|
|
|
var SyncBridgeJS = {
|
|
call: function(methodName, param) {
|
|
return prompt("sync/syncBridge/" + methodName, param);
|
|
}
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|