合并企业版代码(未测试,先提交到测试分支)
This commit is contained in:
@@ -18,14 +18,23 @@ export class CodeField extends Component {
|
||||
setup() {
|
||||
super.setup();
|
||||
}
|
||||
async onBarcodeBtnClick() {
|
||||
async onBarcodeBtnClick() {
|
||||
// console.log(BarcodeScanner)
|
||||
const barcode = await BarcodeScanner.scanBarcode();
|
||||
// console.log(typeof barcode)
|
||||
// alert(barcode)
|
||||
|
||||
if (barcode) {
|
||||
await this.onBarcodeScanned(barcode);
|
||||
// console.log("存在")
|
||||
// alert('存在')
|
||||
|
||||
await this.onBarcodeScanned(barcode);
|
||||
if ("vibrate" in browser.navigator) {
|
||||
browser.navigator.vibrate(100);
|
||||
}
|
||||
} else {
|
||||
// console.log("不存在")
|
||||
// alert('不存在')
|
||||
this.notification.add(this.env._t("Please, scan again !"), {
|
||||
type: "warning",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user