扫码插件(ScanBridge.scanner)
扫码插件提供扫描二维码,条形码功能
//成功回调
var onSuccess = function(message){
alert(message);
}
//失败回调
var onError = function(message){
alert(message);
}
//调用方式
function scan(){
var arguments = {
className:"ScanBridge",
function:"scanner",
successCallBack:"onSuccess",
failCallBack:"onError"
}
HandBridge.postMessage(JSON.stringify(arguments));
}