wx.ready(function () {
document.getElementById("number").focus();
document.getElementById(\'scan\').onclick = function () {
wx.scanQRCode({
needResult: 1,
scanType: [\'qrCode\',\'barCode\'],
success: function (res) {
var code = res.resultStr;
if(code.indexOf(",") >= 0){
code = code.split(",")[1];
}
document.getElementById(\'number\').value = code;
setAjaxOptions(\'blgg\',\'getblgg.htm\',\'number\',false);
var result= submitAjaxFileds(\'getCodes2.htm\',\'\',\'number\',false);
if(result){
var vals=result.split("|");
if(vals.length==1){
document.getElementById("name").value=vals[0];
}
}
}
});
};
});
wx.error(function (res) {
//alert(res.errMsg);
});