lvnengdist/index.html

61 lines
1.8 KiB
HTML
Raw Normal View History

2020-11-04 09:56:57 +08:00
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/dsbridge@3.1.3/dist/dsbridge.js"> </script>
<script src="https://unpkg.com/flyio/dist/fly.min.js"></script>
<script>
var adapter = require("flyio/dist/npm/adapter/dsbridge")
var EngineWrapper = require("flyio/dist/npm/engine-wrapper")
var dsEngine = EngineWrapper(adapter)
var fly = new Fly(dsEngine);
function dispatchScanEvent(code){
alert(code);
}
function onClieck(){
alert("_dsbridge.call存在说明注册成功:" + window["_dsbridge"].call);
2020-11-04 10:00:07 +08:00
console.log(window["_dsbridge"].call)
2020-11-04 09:56:57 +08:00
var provSelect1 = document.getElementById("provSelect1");
//provSelect1.value = "123132";
//alert(provSelect1.focus);
//provSelect1.focus();
provSelect1.value = "";
document.getElementById("button1").blur();
bridge.call("JSSDK.readQRCode", "", function(code){
2020-11-04 10:00:07 +08:00
console.log("hotellog - 扫描结果:" + code);
// provSelect1.value = code;
2020-11-04 09:56:57 +08:00
});
}
function onFly(){
alert(fly);
fly.get('http://192.168.1.95/view/panel/app_updater_version.json')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}
</script>
</head>
<body>
<button id="button1" onclick="onFly()">扫描</button>
<br>
<input type='text' id='provSelect1' disabled name='provSelect1' runat='server' value='请扫描二维码内容' />
</body>
</html>