$scope.scanBarcode = function() {
$cordovaBarcodeScanner.scan().then(function(result) {
// alert("We got a barcode\n" +
// "Result: " + result.text + "\n" +
// "Format: " + result.format + "\n" +
// "Cancelled: " + result.cancelled);
}, function(error) {
alert("An error happened -> " + error);
});
}
}) 我这样写的 没问题 你好,为什么我测试就没有用呢,点击扫描按钮都没效果,是我的sdk没有最新版本的问题么?
这个教程里面有讲扫描二维码的亲们
https://www.itying.com/goods-460.html
1. Ionic3、Ionic4.x、Cordova 调用原生硬件Api 扫描二维码 条形码 -ZBar
2 Ionic3、Ionic4.x、Cordova 调用原生硬件Api 扫描二维码 条形码-Barcode Scanner
FallenLeaves 发表于 2017-11-22 09:49
你好,为什么我测试就没有用呢,点击扫描按钮都没效果,是我的sdk没有最新版本的问题么? ...
我也是这样写的,点击按钮没有任何效果。不知道为什么
页:
1
[2]