This commit is contained in:
Yan
2017-09-15 14:20:53 +06:30
parent f5c32229b7
commit 3e0371a9fb
2 changed files with 5 additions and 4 deletions

View File

@@ -119,19 +119,19 @@ $(function() {
$("#qr_code").on('click', function(e){
var code = "";
setTimeout(function(){
console.log("hi")
getQRCode();
var hi=getQRCode();
alert(hi);
},100);
});
// Read qrcode from java
function getQRCode(){
code2lab.readQRCode();
return code2lab.readQRCode();
}
// get QRCode from Java
function setQRCode(code){
alert(code);
$("#qr_code").text(code);
$("#search").val(code);
}