带扫描效果的cordova扫描二维码插件(支持iOS,swift开发)
cordova plugin add cordova-plugin-qianmi-qrcode
js调用
var button = document.getElementsByClassName('QRCode')[0];
button.onclick = function() {
QRCode.scanCode(success, fail);
function success(info) {
alert(info);
}
function fail() {
alert('扫描二维码失败');
}
};
- iOS
Apache License 2.0