调用微信接口扫码后调用其他js
wx.ready(function () {
document.getElementById('scan').onclick = function () {
wx.scanQRCode({
needResult: 1,
scanType: ['qrCode','barCode'],
success: function (res) {
document.getElementById('number').value = res.resultStr;
//这里写其他js,或者调用其他js函数
}
});
};
});
wx.error(function (res) {
//alert(res.errMsg);
});