【发布时间】:2018-11-09 19:15:12
【问题描述】:
我正在使用 ionic - phonegap-plugin-barcodescanner": "^7.1.2" 进行条码扫描,但是当我单击扫描按钮时 - 相机在 android 模拟器上如下所示。 https://i.stack.imgur.com/e1xL4.png https://i.stack.imgur.com/NS5IB.png
这是我的代码: 扫描() {
this.options = {
preferFrontCamera: true,
showFlipCameraButton: true,
prompt: "scan the barcode here 111"
}
this.barcodeScanner.scan(this.options).then((barcodeData) => {
this.data = barcodeData;
console.log(barcodeData);
}, (err) => {
this.toast.show(err, '5000', 'center').subscribe(
toast => {
console.log(toast);
}
);
});
}
index.html 有以下..
谁能帮忙看看代码有什么问题。
【问题讨论】:
标签: ionic-framework cordova-plugins phonegap-plugins barcode-scanner